src/task2_test.py:22: FutureWarning: The pandas.datetime class is deprecated and will be removed from pandas in a future version. Import from datetime instead. data['weekdays'] = pd.to_datetime(data['time']).apply(pd.datetime.weekday) + 1 /data/workspace/myshixun/src/task2.py:12: FutureWarning: The pandas.datetime class is deprecated and will be removed from pandas in a future version. Import from datetime instead. new_data['weekdays'] = pd.to_datetime(new_data['time']).apply(pd.datetime.weekday) + 1 #时间转化 /usr/local/lib/python3.6/site-packages/matplotlib/cbook/__init__.py:1402: FutureWarning: Support for multi-dimensional indexing (e.g. `obj[:, None]`) is deprecated and will be removed in a future version. Convert to a numpy array before indexing instead. x[:, None] /usr/local/lib/python3.6/site-packages/matplotlib/axes/_base.py:276: FutureWarning: Support for multi-dimensional indexing (e.g. `obj[:, None]`) is deprecated and will be removed in a future version. Convert to a numpy array before indexing instead. x = x[:, np.newaxis] /usr/local/lib/python3.6/site-packages/matplotlib/axes/_base.py:278: FutureWarning: Support for multi-dimensional indexing (e.g. `obj[:, None]`) is deprecated and will be removed in a future version. Convert to a numpy array before indexing instead. y = y[:, np.newaxis] 购买意愿与星期之间的关系图完成! 购买意愿与日期之间的关系图完成!
时间: 2024-04-20 08:27:19 浏览: 231
这个问题似乎不是一个问题,而是一段代码的输出结果。这段代码包含了一些FutureWarning,这是由于使用了即将被弃用的代码或方法而产生的警告。这些警告不会影响代码的运行,但是建议尽快修改代码以避免可能出现的问题。另外,这段代码还包含了两张关系图,分别是购买意愿与星期之间的关系图和购买意愿与日期之间的关系图。这些图表可能是使用matplotlib等数据可视化工具生成的。
相关问题
D:\Program Files\anaconda3\lib\site-packages\statsmodels\tsa\base\tsa_model.py:7: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. from pandas import (to_datetime, Int64Index, DatetimeIndex, Period, D:\Program Files\anaconda3\lib\site-packages\statsmodels\tsa\base\tsa_model.py:7: FutureWarning: pandas.Float64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. from pandas import (to_datetime, Int64Index, DatetimeIndex, Period,
这是一个 FutureWarning 的警告信息,意味着在未来的版本中,pandas 库将移除 pandas.Int64Index 和 pandas.Float64Index。建议使用适当的 dtype,使用 pandas.Index 替代它们。这个警告信息出现在 statsmodels.tsa.base.tsa_model 模块中的 tsa_model.py 文件中的第7行。它在引入一些模块时使用了过时的索引类型。你可以考虑更新你的代码,使用 pandas.Index 来替代这些过时的索引类型,以避免未来版本中的问题。
阅读全文