title: How do i change the date format to (YYYY-YY) in the bar chart
body: <p>This is what it looks like:</p>
  <p><a href="https://i.stack.imgur.com/w0qPg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w0qPg.png" alt="" /></a></p>
  <p>Data for reference and how i want the date format to look like:</p>
  <p><a href="https://i.stack.imgur.com/rgWok.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rgWok.png" alt="" /></a></p>
  <pre><code>from matplotlib.ticker import NullFormatter
  def formatter(x, pos):
      return str(round(x / 1e6, 1)) + &quot; million&quot;
  df = pd.DataFrame(df_student_enrollment)
  fig, ax = plt.subplots()
  ax.yaxis.set_major_formatter(formatter)
  ax.yaxis.set_minor_formatter(NullFormatter())
  ax.plot([0, 1], [0, 2e7])
  plt.bar(X, Y, color='b')
  plt.title(&quot;Student Enrollment&quot;)
  plt.xlabel(&quot;Year&quot;)
  plt.ylabel(&quot;Number of students(in millions)&quot;)
  plt.show()
  </code></pre>