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
songdg
V2EX  ›  Python

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

  •  
  •   songdg · 2020-07-14 09:48:59 +08:00 · 1364 次点击
    这是一个创建于 1376 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    2 条回复    2020-07-15 09:55:48 +08:00
    Cooky
        1
    Cooky  
       2020-07-14 10:05:15 +08:00 via Android
    encode ?
    songdg
        2
    songdg  
    OP
       2020-07-15 09:55:48 +08:00
    问题解决,谢谢帮助。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2966 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 03:23 · PVG 11:23 · LAX 20:23 · JFK 23:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.