全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 python论坛
1079 1
2021-12-12
ax= plt.subplot()
mondays = WeekdayLocator(MONDAY)
mondays
weekFormatter = DateFormatter('%y %b %d')
ax.xaxis.set_major_locator(mondays)
ax.xaxis.set_minor_locator(DayLocator() )
ax.xaxis.set_major_formatter(weekFormatter)
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
ax.set_title("妙可蓝多2020年K线图")
candlestick_ohlc(ax, MKLD5, width=0.7,colorup='r', colordown='g')
plt.setp(plt.gca().get_xticklabels(),rotation=50, horizontalalignment='center')
plt.show()


TypeError: unsupported operand type(s) for -: 'str' and 'str'
我再运行代码的时候出现了这种错误,该怎么解决

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2024-3-20 12:20:05
类型错误不好判断哪里处理问题   贴出全部代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群