Catalog PyPI
PACKAGE EXPLORERView in registry

aiida-dataframe

PyPI

AiiDA data plugin for pandas DataFrame objects

aiidaplugin
Versions collected1
Direct dependencies18From release 0.2.0
Last observed21 Oct, 10:57 UTC

README

Version 0.2.0 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.017 Jul 202518

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
janssenhenning/aiida-dataframe

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:57 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2238d2b2317dd9285bc36a32965401a5868b0d175d72bdb9a1d23ff7740bbbde