Python小白求助:matplotlib中文显示方块、DataFrame的sort_index方法使用问题以及B站弹幕WebSocket链接与教程不符

2 的错误提示 TypeError: ‘<’ not supported between instances of ‘str’ and 'int (但是不加括号就可以工作)
3 的弹幕链接名字应该是 broadcast.chat 什么的 我只有 tx-gz3-comet 什么的
Python小白求助:matplotlib中文显示方块、DataFrame的sort_index方法使用问题以及B站弹幕WebSocket链接与教程不符

3 回复

我无法理解你的问题


第一个问题看楼上,设置下就好,
第二个问题,执行我下面的代码看看,思考下

<br>df = pd.DataFrame({'A':[1,2,3,'a','b'],'B':['1','2','3','a','b']})<br><br>df.set_index('A').sort_index()<br><br>df.set_index('B').sort_index()<br><br>

回到顶部