seaborn time series from pandas dataframe

后端 未结 1 769
生来不讨喜
生来不讨喜 2021-01-12 06:44

I\'m struggling with what seems to be a very easy problem: how to get seaborn to plot a time series line chart from a pandas dataframe. What am I doing wrong here?



        
相关标签:
1条回答
  • 2021-01-12 07:18

    The tsplot of seaborn is not meant to plot a simple timeseries line plot, but to plot uncertainties, see:https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.tsplot.html.

    For a line plot, you can simply do

    df.set_index('Date').plot()
    
    0 讨论(0)
提交回复
热议问题