7

修改 pytables 表格里的行的问题

 2 years ago
source link: https://www.v2ex.com/t/842897
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Python

修改 pytables 表格里的行的问题

  songdg · 17 小时 3 分钟前 · 222 次点击

使用 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()


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK