V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
yellowtail
V2EX  ›  Python

小白攒了三个问题: matplotlib 画图时中文出来全是方块; dataframe 的 sort_index 方法加了括号就不能用;我电脑上 b 站弹幕的 websocket 链接和教程里名字不一样...

  •  
  •   yellowtail · 2019 年 6 月 27 日 · 1672 次点击
    这是一个创建于 2412 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 的错误提示 TypeError: '<' not supported between instances of 'str' and 'int (但是不加括号就可以工作)
    3 的弹幕链接名字应该是 broadcast.chat 什么的 我只有 tx-gz3-comet 什么的
    2 条回复    2019-07-01 18:00:32 +08:00
    silkriver
        1
    silkriver  
       2019 年 6 月 28 日   ❤️ 1
    1 https://www.jianshu.com/p/6f9f6b2c6067
    2 3 需要发具体的代码
    princelai
        2
    princelai  
       2019 年 7 月 1 日   ❤️ 1
    第一个问题看楼上,设置下就好,
    第二个问题,执行我下面的代码看看,思考下

    ```
    df = pd.DataFrame({'A':[1,2,3,'a','b'],'B':['1','2','3','a','b']})

    df.set_index('A').sort_index()

    df.set_index('B').sort_index()

    ```
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1134 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 18:08 · PVG 02:08 · LAX 10:08 · JFK 13:08
    ♥ Do have faith in what you're doing.