title: Specifying the x-axis when importing a csv with pandas
body: <p>I am not sure why but the data I have imported from my csv files is all plotted on the y-axis. This is what I want in this case, but I would like to know how to import x-axis data from a csv file. </p>
  
  <p>It doesn't seem to let me import dates as strings but anyhow in most cases I just want the year along the x-axis. E.g 2006, 2007...2016, or maybe with the month as well as year. How could I go about do this by amending the following code? I have attached a photo of the plot after the code. </p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import numpy as np
  from matplotlib import style
  
  style.use('bmh')
  
  df = pd.read_csv("C:/Users/Paul/Desktop/pandas datasets/belfast_centre.csv")
  df2 = pd.read_csv("C:/Users/Paul/Desktop/pandasdatasets/cardiff_centre.csv")
  
  ozone_subset = df.iloc[:, 2,]  
  ozone_subset2 = df2.iloc[:, 2]
  
  ozone_subset.plot(color="green", linewidth=2, linestyle="-")
  ozone_subset2.plot(color="azure", linewidth=2, linestyle="-")
  
  plt.title('Nitrogen oxides - monthly averages',fontsize = 'large',fontname='Arial',)
  plt.ylabel('NOx ugm-3',fontname='Arial',fontsize = 'medium')
  plt.xlabel('Month number',fontname='Arial',fontsize = 'medium')
  plt.legend(loc='upper right', fontsize = 'small')
  plt.show()
  </code></pre>
  
  <p>Monthly time series plot from the above code</p>
  
  <p><a href="https://i.stack.imgur.com/X9y75.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X9y75.png" alt="enter image description here"></a></p>