BlueBrain / BlueBrain/nexus-forge

Store metadata in pandas dataframe is loaded differently than its original format in the Resource

Open
#342 0 comments 0 reactions 0 assignees View on GitHub
invalid
Dominant language
Python
Stars
52
Forks
21
PR merge metrics
No merged PRs in 30d

Description

If you have a Resource `r` and you store it in a `pandas.Dataframe` with `df = forge.as_dataframe(r, store_metadata=True)` and you later convert it back to a Resource with `r = forge.from_dataframe(df)`

The store metadata is initially stored in resource in `r._store_metadata` and inside this object you'd have properties such as `_rev, _project, _synchronized`...

After reloading the resource from the dataframe these properties `_rev, _project, _synchronized` are top level properties of the Resource and no longer within the` _store_metadata` object. This `_store_metadata` becomes None.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.