title: matplotlib.units.ConversionError: Failed to convert value(s) to axis units: NaT
body: <p>I am trying to plot the following time-series data and draw some vertical lines based on the first date and last date. If there is any NA I am getting an error. I would like to run the code without any error but keeping NA values in the Date column.</p>
  <p>data</p>
  <pre><code>Date       Result
  2017-01-06     0.0
  2017-01-07     1.0
  2017-01-08     0.0
  2017-01-09     0.0
  2017-01-010    0.0
  NA    0.0
  </code></pre>
  <p>code</p>
  <pre><code>first = '2017-01-06'
  last = 'NA'
  
  fig, ax = plt.subplots()
  ax.bar(data['Date'], data['Result'], linestyle='-',color='midnightblue' ,lw=6, width=0.3)
  ax.axvline(pd.to_datetime('first'), color='red', zorder=1, linestyle='--', lw=8)
  ax.axvline(pd.to_datetime('last'), color='red', zorder=1, linestyle='--', lw=8)
  figure = fig.savefig(result, bbox_inches='tight') 
  </code></pre>