推荐学习书目
› 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
songdg
V2EX  ›  Python

请教 pytables 如何存储中文字符串

  •  
  •   songdg · Jul 14, 2020 · 2354 views
    This topic created in 2264 days ago, the information mentioned may be changed or developed.

    我根据指引文档的例子创建了一个表使用以下的类,想让表增加行时,当给 name 赋值中文字符串时出现类型出错的提示,我想知道用什么类型才能支持中文。 class Particle(IsDescription): name = StringCol(itemsize=16) # 16-character string

    2 replies  •  2020-07-15 09:55:48 +08:00
    Cooky
        1
    Cooky  
       Jul 14, 2020 via Android
    encode ?
    songdg
        2
    songdg  
    OP
       Jul 15, 2020
    问题解决,谢谢帮助。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2624 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 13:12 · PVG 21:12 · LAX 06:12 · JFK 09:12
    ♥ Do have faith in what you're doing.