pdtable


Namepdtable JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/startable/pdtable/
SummaryReads and writes data stored in StarTable format; and stores table data inmemory as a Pandas data frame for easy manipulation.
upload_time2024-01-04 14:44:51
maintainer
docs_urlNone
authorJean-François Corbett
requires_python>=3.7
licenseBSD-3-Clause
keywords startable data-structure file-format table dataframe json
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pdtable

![run-tests](https://github.com/startable/pdtable/workflows/run-tests/badge.svg)

The `pdtable` Python package offers interfaces to read, write, and manipulate StarTable data.

## Documentation

The pdtable documentation is available at [pdtable.readthedocs.io](https://pdtable.readthedocs.io/). 

## Examples 

Demo: see the [pdtable_demo notebook](examples/pdtable_demo.ipynb) or, if you a Jupyter notebook doesn't do it for you, the notebook's [paired script](examples/pdtable_demo.py).

## Installation

pdtable is available from pypi.org
```commandline
pip install pdtable
```
and from conda-forge
```commandline
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/startable/pdtable/",
    "name": "pdtable",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "startable data-structure file-format table dataframe json",
    "author": "Jean-Fran\u00e7ois Corbett",
    "author_email": "jeaco@orsted.dk",
    "download_url": "https://files.pythonhosted.org/packages/b3/29/d287c8e1c7a63a379302acfa1d3bbb3bf8b732d2349b65cb12803a66b947/pdtable-1.0.0.tar.gz",
    "platform": null,
    "description": "# pdtable\n\n![run-tests](https://github.com/startable/pdtable/workflows/run-tests/badge.svg)\n\nThe `pdtable` Python package offers interfaces to read, write, and manipulate StarTable data.\n\n## Documentation\n\nThe pdtable documentation is available at [pdtable.readthedocs.io](https://pdtable.readthedocs.io/). \n\n## Examples \n\nDemo: see the [pdtable_demo notebook](examples/pdtable_demo.ipynb) or, if you a Jupyter notebook doesn't do it for you, the notebook's [paired script](examples/pdtable_demo.py).\n\n## Installation\n\npdtable is available from pypi.org\n```commandline\npip install pdtable\n```\nand from conda-forge\n```commandline\nconda install pdtable -c conda-forge\n```\n\n## Data and metadata: storage and access\n\nTable 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.\n\nData 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.\n\nThe 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.\n\n## I/O\n\nReaders 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.\n\nReading 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.\n\nDirective blocks are parsed by the readers, and presented to the client code for application-specific interpretation.\n\nImport from and export to JSON is also supported.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Reads and writes data stored in StarTable format; and stores table data inmemory as a Pandas data frame for easy manipulation.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/startable/pdtable/"
    },
    "split_keywords": [
        "startable",
        "data-structure",
        "file-format",
        "table",
        "dataframe",
        "json"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "418d789e9a4bae1d6c547e5c0c13797af969bf5a805b06c500b2a38aa242f54a",
                "md5": "671a97e040a527bb237cb87488ba2358",
                "sha256": "ce538f6ae7af2a6c7ec2b4fa801002b5340a6853f4111dd181b10eeb4c2d229a"
            },
            "downloads": -1,
            "filename": "pdtable-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "671a97e040a527bb237cb87488ba2358",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 100163,
            "upload_time": "2024-01-04T14:44:49",
            "upload_time_iso_8601": "2024-01-04T14:44:49.880306Z",
            "url": "https://files.pythonhosted.org/packages/41/8d/789e9a4bae1d6c547e5c0c13797af969bf5a805b06c500b2a38aa242f54a/pdtable-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b329d287c8e1c7a63a379302acfa1d3bbb3bf8b732d2349b65cb12803a66b947",
                "md5": "617e72be23276d11dfb153e2e5bbdf75",
                "sha256": "c61c83e8fa25e7cde30c19c9dac002281bcec55efb0e04971b03d13dd88b0ce2"
            },
            "downloads": -1,
            "filename": "pdtable-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "617e72be23276d11dfb153e2e5bbdf75",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 79765,
            "upload_time": "2024-01-04T14:44:51",
            "upload_time_iso_8601": "2024-01-04T14:44:51.697458Z",
            "url": "https://files.pythonhosted.org/packages/b3/29/d287c8e1c7a63a379302acfa1d3bbb3bf8b732d2349b65cb12803a66b947/pdtable-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 14:44:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "startable",
    "github_project": "pdtable",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pdtable"
}
        
Elapsed time: 0.16116s