title: Plot the x-axis as a date
body: <p>I am trying to perform some analysis on data. I got csv file and I convert it into pandas dataframe. the data looks like this. Its has several columns, but I am trying to draw x-axis as date column. . </p>
  
  <p>the pandas dataframe looks like this </p>
  
  <pre><code>print (df.head(10)
  
      cus-id        date       value_limit
  0   10173         2011-06-12        455
  1   95062         2011-09-11        455
  2   171081        2011-07-05        212
  3   122867        2011-08-18        123
  4   107186        2011-11-23        334
  5   171085        2011-09-02        376
  6   169767        2011-07-03        34
  7   80170         2011-03-23        34
  8   154178        2011-10-02        34
  9   3494          2011-01-01        34
  </code></pre>
  
  <p>I am trying to plot date data because there are multiple values for same date. for this purpose I am trying to plot x-asis ticks as date. since the minimum date in date column is 2011-01-01 and maximum date is 2012-04-20. </p>
  
  <p>I tried something like this</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  import datetime
  import matplotlib.dates as mdates
  
  df = pd.read_csv('rio_data.csv', delimiter=',')
  print (df.head(10))
  d = []
  for dat in df.date:
      # print (dat)
      d.append(datetime.strptime(df['date'], '%Y-%m-%d'))
  days = dates.DayLocator()
  datemin = datetime(2011, 1, 1)
  datemax = datetime(2012, 4, 20) 
  fig = plt.figure()
  ax = fig.add_subplot(111)
  ax.xaxis.set_major_locator(days)
  ax.set_xlim(datemin, datemax)
  ax.set_ylabel('Count values')
  </code></pre>
  
  <p>But I am getting this error. </p>
  
  <pre><code> AttributeError: 'DataFrame' object has no attribute 'date'
  </code></pre>
  
  <p>I am trying to draw date as x-axis, it should look like this. <a href="https://i.stack.imgur.com/HE7h1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HE7h1.png" alt="enter image description here"></a></p>
  
  <p>Can someone help me to draw the x-axis as date column. I would be grateful. </p>