Skip to main content

Build Status Coverage Status Docs status PyPI version

aiida-dataframe

AiiDA data plugin for pandas DataFrame objects

Features

  • Store pandas.DataFrame objects in the Database:

    import pandas as pd
    PandasFrameData = DataFactory('dataframe.frame')
    df = pd.DataFrame(
         {
             "A": 1.0,
             "B": pd.Timestamp("20130102"),
             "C": pd.Series(1, index=list(range(4)), dtype="float32"),
             "D": np.array([3] * 4, dtype="int32"),
             "E": pd.Categorical(["test", "train", "test", "train"]),
             "F": "foo",
         }
     )
    df_node = PandasFrameData(df)
    df_node.store()
    
  • Retrieving the pandas.DataFrame from the Database :

    from aiida.orm import QueryBuilder
    df_node = QueryBuilder().append(PandasFrameData).first()[0]
    df = df_node.df #The df property reconstructs the pandas DataFrame
    print(df.head())
    

Installation

pip install aiida-dataframe
verdi quicksetup  # better to set up a new profile
verdi plugin list aiida.data  # should now show your data plugins

Usage

The plugin also includes verdi commands to inspect its data types:

verdi data dataframe list
verdi data dataframe export <PK>
verdi data dataframe show <PK>

Development

git clone https://github.com/janssenhenning/aiida-dataframe .
cd aiida-dataframe
pip install --upgrade pip
pip install -e .[pre-commit,testing]  # install extra dependencies
pre-commit install  # install pre-commit hooks
pytest -v  # discover and run all tests

See the developer guide for more information.

License

MIT

Contact

henning.janssen@gmx.net

Metadata

Release files for aiida-dataframe 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiida-dataframe 0.2.0
File Size Uploaded
aiida_dataframe-0.2.0.tar.gz 93.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiida-dataframe 0.2.0
File Interpreter ABI Platform
aiida_dataframe-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.5 kB

Release files / aiida_dataframe-0.2.0.tar.gz

Download URL aiida_dataframe-0.2.0.tar.gz
Size 93.7 kB
Tags Source
SHA-256 checksum
How to use checksums
99b88c23f778c5f568e6cda5bb4ea95f971da7f7f39b80809952eaa6a4143fd6
BLAKE2b-256 checksum
How to use checksums
ee1ba01387f75fccf8ddab0ee549930f13ad0e8d6053c3358a99108db89f0225
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.4

Release files / aiida_dataframe-0.2.0-py3-none-any.whl

Download URL aiida_dataframe-0.2.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c81873f1628189804f33129dfbb4386943440cdf4f49c5b0aa8184bd28f774c3
BLAKE2b-256 checksum
How to use checksums
3631d4ebe6ec396ae1ddd856ad8a4f4b96822111ff974ed968422b919ac7a147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.4

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page