推荐学习书目
› 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 · Mar 25, 2022 · 2878 views
    This topic created in 1647 days ago, the information mentioned may be changed or developed.
    使用 class Brief 创建了一个 pytables 的表格,问题是创建后的表格是不按照 class Brief 指定的顺序创建列,有可能列的顺序是( debut ,price ,appear ,counter ,name ,update )或者是其他顺序,而使用 modify_rows 修改表格里的行必须按照指定的数据类型。
    class Brief(tb.IsDescription):
    name = tb.StringCol(256)
    price = tb.Float32Col()
    debut = tb.Time32Col()
    update = tb.Time32Col()
    counter = tb.UInt64Col()
    appear = tb.BoolCol()
    2 replies  •  2022-03-29 09:06:30 +08:00
    ec0
        1
    ec0  
       Mar 25, 2022   ❤️ 1
    name = tb.StringCol(256, pos=0)
    price = tb.Float32Col(pos=1)
    debut = tb.Time32Col(pos=2)
    ...
    songdg
        2
    songdg  
    OP
       Mar 29, 2022
    @ec0 问题解决,非常感谢。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   808 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:39 · PVG 04:39 · LAX 13:39 · JFK 16:39
    ♥ Do have faith in what you're doing.