Name | aiida-dataframe JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | AiiDA data plugin for pandas DataFrame objects |
upload_time | 2023-05-03 19:25:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
aiida
plugin
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![Build Status][ci-badge]][ci-link]
[![Coverage Status][cov-badge]][cov-link]
[![Docs status][docs-badge]][docs-link]
[![PyPI version][pypi-badge]][pypi-link]
# aiida-dataframe
AiiDA data plugin for pandas DataFrame objects
## Features
* Store `pandas.DataFrame` objects in the Database:
```python
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 :
```python
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
```shell
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:
```shell
verdi data dataframe list
verdi data dataframe export <PK>
verdi data dataframe show <PK>
```
## Development
```shell
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](http://aiida-dataframe.readthedocs.io/en/latest/developer_guide/index.html) for more information.
## License
MIT
## Contact
henning.janssen@gmx.net
[ci-badge]: https://github.com/janssenhenning/aiida-dataframe/workflows/ci/badge.svg?branch=main
[ci-link]: https://github.com/janssenhenning/aiida-dataframe/actions
[cov-badge]: https://codecov.io/gh/janssenhenning/aiida-dataframe/branch/main/graph/badge.svg
[cov-link]: https://codecov.io/gh/janssenhenning/aiida-dataframe
[docs-badge]: https://readthedocs.org/projects/aiida-dataframe/badge
[docs-link]: http://aiida-dataframe.readthedocs.io/
[pypi-badge]: https://badge.fury.io/py/aiida-dataframe.svg
[pypi-link]: https://badge.fury.io/py/aiida-dataframe
Raw data
{
"_id": null,
"home_page": null,
"name": "aiida-dataframe",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "aiida,plugin",
"author": null,
"author_email": "Henning Jan\u00dfen <henning.janssen@gmx.net>",
"download_url": "https://files.pythonhosted.org/packages/0e/4f/4d11f0801dcbd9cd8f9aaaff91e0621aaaadde92d51f2abf93d73ae5307d/aiida-dataframe-0.1.2.tar.gz",
"platform": null,
"description": "[![Build Status][ci-badge]][ci-link]\n[![Coverage Status][cov-badge]][cov-link]\n[![Docs status][docs-badge]][docs-link]\n[![PyPI version][pypi-badge]][pypi-link]\n\n# aiida-dataframe\n\nAiiDA data plugin for pandas DataFrame objects\n\n## Features\n\n * Store `pandas.DataFrame` objects in the Database:\n ```python\n import pandas as pd\n PandasFrameData = DataFactory('dataframe.frame')\n df = pd.DataFrame(\n {\n \"A\": 1.0,\n \"B\": pd.Timestamp(\"20130102\"),\n \"C\": pd.Series(1, index=list(range(4)), dtype=\"float32\"),\n \"D\": np.array([3] * 4, dtype=\"int32\"),\n \"E\": pd.Categorical([\"test\", \"train\", \"test\", \"train\"]),\n \"F\": \"foo\",\n }\n )\n df_node = PandasFrameData(df)\n df_node.store()\n ```\n\n * Retrieving the `pandas.DataFrame` from the Database :\n ```python\n from aiida.orm import QueryBuilder\n df_node = QueryBuilder().append(PandasFrameData).first()[0]\n df = df_node.df #The df property reconstructs the pandas DataFrame\n print(df.head())\n ```\n\n## Installation\n\n```shell\npip install aiida-dataframe\nverdi quicksetup # better to set up a new profile\nverdi plugin list aiida.data # should now show your data plugins\n```\n\n## Usage\n\nThe plugin also includes verdi commands to inspect its data types:\n```shell\nverdi data dataframe list\nverdi data dataframe export <PK>\nverdi data dataframe show <PK>\n```\n\n## Development\n\n```shell\ngit clone https://github.com/janssenhenning/aiida-dataframe .\ncd aiida-dataframe\npip install --upgrade pip\npip install -e .[pre-commit,testing] # install extra dependencies\npre-commit install # install pre-commit hooks\npytest -v # discover and run all tests\n```\n\nSee the [developer guide](http://aiida-dataframe.readthedocs.io/en/latest/developer_guide/index.html) for more information.\n\n## License\n\nMIT\n## Contact\n\nhenning.janssen@gmx.net\n\n\n[ci-badge]: https://github.com/janssenhenning/aiida-dataframe/workflows/ci/badge.svg?branch=main\n[ci-link]: https://github.com/janssenhenning/aiida-dataframe/actions\n[cov-badge]: https://codecov.io/gh/janssenhenning/aiida-dataframe/branch/main/graph/badge.svg\n[cov-link]: https://codecov.io/gh/janssenhenning/aiida-dataframe\n[docs-badge]: https://readthedocs.org/projects/aiida-dataframe/badge\n[docs-link]: http://aiida-dataframe.readthedocs.io/\n[pypi-badge]: https://badge.fury.io/py/aiida-dataframe.svg\n[pypi-link]: https://badge.fury.io/py/aiida-dataframe\n",
"bugtrack_url": null,
"license": null,
"summary": "AiiDA data plugin for pandas DataFrame objects",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://aiida-dataframe.readthedocs.io",
"Home": "https://aiida-dataframe.readthedocs.io",
"Source": "https://github.com/janssenhenning/aiida-dataframe"
},
"split_keywords": [
"aiida",
"plugin"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c7a3e692a4173b9d48fcd2c767f0eb1425f55362b29c6564c1375f5314e9200b",
"md5": "f0a0296dd904c936b0ecee9b1ca74cd3",
"sha256": "deb7ef75e4b6145df481cf9692d9e30d1ad8121badddc7c776fa7b28203eb6cc"
},
"downloads": -1,
"filename": "aiida_dataframe-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f0a0296dd904c936b0ecee9b1ca74cd3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6750,
"upload_time": "2023-05-03T19:25:06",
"upload_time_iso_8601": "2023-05-03T19:25:06.550962Z",
"url": "https://files.pythonhosted.org/packages/c7/a3/e692a4173b9d48fcd2c767f0eb1425f55362b29c6564c1375f5314e9200b/aiida_dataframe-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0e4f4d11f0801dcbd9cd8f9aaaff91e0621aaaadde92d51f2abf93d73ae5307d",
"md5": "7145d2ce20afce914bef87f3aa8ff063",
"sha256": "d52dbf945d1de4898b5e85bcad5d68ab393ecee1feff51a7240f70d1e5661c58"
},
"downloads": -1,
"filename": "aiida-dataframe-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "7145d2ce20afce914bef87f3aa8ff063",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 91595,
"upload_time": "2023-05-03T19:25:08",
"upload_time_iso_8601": "2023-05-03T19:25:08.741570Z",
"url": "https://files.pythonhosted.org/packages/0e/4f/4d11f0801dcbd9cd8f9aaaff91e0621aaaadde92d51f2abf93d73ae5307d/aiida-dataframe-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-03 19:25:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "janssenhenning",
"github_project": "aiida-dataframe",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aiida-dataframe"
}