How to plot dates on the x-axis using Seaborn (or matplotlib)
<p>I have a csv file with some time series data.  I create a Data Frame as such:</p>

<pre><code>df = pd.read_csv('C:\\Desktop\\Scripts\\TimeSeries.log')
</code></pre>

<p>When I call <code>df.head(6)</code>, the data appears as follows:</p>

<pre><code>Company     Date                 Value
ABC         08/21/16 00:00:00    500
ABC         08/22/16 00:00:00    600
ABC         08/23/16 00:00:00    650
ABC         08/24/16 00:00:00    625
ABC         08/25/16 00:00:00    675
ABC         08/26/16 00:00:00    680
</code></pre>

<p>Then, I have the following to force the 'Date' column into datetime format:</p>

<pre><code>df['Date'] = pd.to_datetime(df['Date'], errors = 'coerce')
</code></pre>

<p>Interestingly, I see "<code>pandas.core.series.Series</code>" when I call the following:</p>

<pre><code>type(df['Date'])
</code></pre>

<p>Finally, I call the following to create a plot:</p>

<pre><code>%matplotlib qt
sns.tsplot(df['Value'])
</code></pre>

<p>On the x-axis from left to right, I see integers ranging from 0 to the number of rows in the data frame.  How does one add the 'Date' column as the x-axis values to this plot?</p>

<p>Thanks! </p>

<p>Not sure that tsplot is the best tool for that. You can just use:</p>

<pre><code>df[['Date','Value']].set_index('Date').plot()
</code></pre>

python matplotlib seaborn timeserieschart