我正在尝试与Seaborn进行时间序列图。
我的数据是:
plot_data
Deflated_Index_Norm CCI_Norm BCI_Norm Date
0 1.0 1.000000 1.0 1989-01-01
1 1.0 1.009339 1.0 1989-01-01
2 1.0 0.992044 1.0 1989-01-01
3 1.0 1.007378 1.0 1989-01-01
4 1.0 0.998444 1.0 1989-01-01
5 1.0 0.990092 1.0 1989-01-01
6 1.0 1.001803 1.0 1989-01-01
7 1.0 0.993946 1.0 1989-01-01
8 1.0 0.993131 1.0 1989-01-01
9 1.0 0.999931 1.0 1989-01-01
plot_data.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 10 entries, 0 to 9
Data columns (total 4 columns):
Deflated_Index_Norm 10 non-null float64
CCI_Norm 10 non-null float64
BCI_Norm 10 non-null float64
Date 10 non-null datetime64[ns]
dtypes: datetime64[ns](1), float64(3)
memory usage: 400.0 bytes
import seaborn as sns
sns.tsplot(data = plot_data, time = 'Date')
ValueError: setting an array element with a sequence.
我不明白错误消息的含义。
您的建议将不胜感激。