BlueBrain / nexus-forge

Building and Using Knowledge Graphs made easy
https://nexus-forge.readthedocs.io
GNU Lesser General Public License v3.0
38 stars 19 forks source link

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

Open ssssarah opened 10 months ago

ssssarah commented 10 months ago

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.