1

When plotting a CSV with pandas the values below with seaborn:

 value date 0.296776 2016-07-01 0.273482 2016-08-01 0.207982 2016-09-01 0.176148 2016-10-01 0.124666 2016-11-01 0.072311 2016-12-01 0.042762 2017-01-01 0.043232 2017-02-01 0.083472 2017-03-01 

sns.tsplot(time="date", value="value", data=df)

I only get an empty white plane - what is wrong?

1 Answer 1

1

The thing with .tsplot is that it's meant to plot timeseries with representation of uncertainty, so if you are not providing to the function a field in the DataFrame that identifies the sampling unit, it's not going to work.

To bypass this without going through the trouble of modifying your .csv dataset, you should not use the data argument:

>>> sns.tsplot(df['value'],time=df['date']) <matplotlib.axes._subplots.AxesSubplot object at 0x07DA7A30> >>> sns.plt.show() 

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.