Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An engine agonistic parser #316

Closed
xiki-tempula opened this issue May 23, 2023 · 0 comments · Fixed by #317
Closed

An engine agonistic parser #316

xiki-tempula opened this issue May 23, 2023 · 0 comments · Fixed by #317

Comments

@xiki-tempula
Copy link
Collaborator

I'm thinking of an engine agonistic IO that would load a dataframe directly from a file and save it to a file and read it back.
I think the pyarrow implementation of the parquet is a good choice where it faithfully reproduce the complex index that we are using.

The interface that i'm thinking of would be

from alchemlyb.parsing.parquet import extract_dHdl, extract_u_nk
import pandas as pd

u_nk.to_parquet(path='u_nk.parquet', index=True)
dHdl.to_parquet(path='dHdl.parquet', index=True)

new_u_nk = extract_u_nk('u_nk.parquet', T=300)
new_dHdl = extract_dHdl('dHdl.parquet', T=300)

assert new_u_nk==u_nk
assert new_dHdl==dHdl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant