我正在尝试使用 seaborn 绘制 regplot 并且我无法绘制它并面临TypeError: Cannot cast array data from dtype('int64') to dtype('int32') 根据规则 'safe'。
我的数据有 731 行和 16 列 -
>>> bike_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 731 entries, 0 to 730
Data columns (total 16 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 instant 731 non-null int64
1 dteday 731 non-null object
2 season 731 non-null int64
3 yr 731 non-null int64
4 mnth 731 non-null int64
5 holiday 731 non-null int64
6 weekday 731 …Run Code Online (Sandbox Code Playgroud)