2024-09-19 23:38:11 发布
网友
此代码没有错误:
r = df1.rolling(window = 32) r['msprice'].plot(color='red')
但是,该代码:
给出以下错误:
ValueError: could not convert string to float: During handling of the above exception, another exception occurred:
亲爱的
我也有过类似的经历,下面是我的解决方案。在
df['Quantity'].astype(float).rolling(window=7).mean().plot(figsize=(11,3))
在前面绘制的Quantity列中,它以字符串形式读取值。解决方案是将值转换为float或int。在
谨致问候
亲爱的
我也有过类似的经历,下面是我的解决方案。在
在前面绘制的Quantity列中,它以字符串形式读取值。解决方案是将值转换为float或int。在
谨致问候
相关问题 更多 >
编程相关推荐