Pdtable
Python API to work with StarTable data, with tables stored as pandas dataframes.
Install / Use
/learn @startable/PdtableREADME
pdtable
The pdtable Python package offers interfaces to read, write, and manipulate StarTable data.
Documentation
The pdtable documentation is available at pdtable.readthedocs.io.
Examples
Demo: see the pdtable_demo notebook or, if you a Jupyter notebook doesn't do it for you, the notebook's paired script.
Installation
pdtable is available from pypi.org
pip install pdtable
and from conda-forge
conda install pdtable -c conda-forge
Data and metadata: storage and access
Table blocks are stored as TableDataFrame objects, which inherit from pandas.DataFrame but include additional, hidden metadata. This hidden metadata contains all the information from Table blocks that does not fit in a classic Pandas dataframe object: table destinations, column units, table origin, etc.
Data in TableDataFrame objects can be accessed and manipulated using the Pandas API as it the object were a vanilla Pandas dataframe, with all the convenience that this entails.
The StarTable-specific metadata hidden in a TableDataFrame's metadata can in principle be accessed directly; however a much more ergonomic interface is offered via a Table facade object, which is a thin wrapper around TableDataFrame. Table also supports some limited data manipulation, though with the advantage of more easily supporting StarTable-specific metadata; for example, easily specifying column units when adding new columns.
I/O
Readers and writers are available for CSV and Excel, both as files and as streams. Parsing is efficient and, by default, lenient, though this is readily customized.
Reading can also be filtered early, such that only certain block types or tables with certain names get fully parsed. This can reduce reading time substantially when reading e.g. only a few tables from an otherwise large file or stream.
Directive blocks are parsed by the readers, and presented to the client code for application-specific interpretation.
Import from and export to JSON is also supported.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
