title: Why am I getting this matplotlib error for plotting a categorical variable?
body: <p>I feel stupid but I cannot seem to fix this error or find any solution online. Why do I keep getting the following error no matter how I try to plot it using matplotlib?</p>
  <p>For instance even the following code gives me the same error -</p>
  <pre><code>names = list(fig1['day'])
  values = list(fig1['count'])
  fig, axs = plt.subplots(figsize=(25, 10))
  axs.bar(names, values, color='plum')
  </code></pre>
  <p><strong>matplotlib.category: Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.</strong></p>
  <p><a href="https://i.stack.imgur.com/D4bkF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D4bkF.png" alt="enter image description here" /></a></p>
  <p>UPDATE: I found the solution - <a href="https://discourse.matplotlib.org/t/why-am-i-getting-this-matplotlib-error-for-plotting-a-categorical-variable/21758/2" rel="nofollow noreferrer">https://discourse.matplotlib.org/t/why-am-i-getting-this-matplotlib-error-for-plotting-a-categorical-variable/21758/2</a></p>