Last active
July 11, 2019 23:36
-
-
Save joonro/c0c00f14113bbee4840d16bf1f70a72d to your computer and use it in GitHub Desktop.
[pandas HDFStore] Storing and loading DataFrames via `pd.DataFrame`. #python #pandas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| HDFStore = pd.HDFStore(os.path.join(home, 'Data/Name.ph5'), mode='r') | |
| df = HDFStore['/df'] | |
| HDFStore.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| HDFStore = pd.HDFStore( | |
| os.path.join(home, 'Data/Name.ph5'), | |
| mode='w', | |
| complevel=9, complib='blosc' | |
| ) | |
| HDFStore.put('df', df) | |
| HDFStore.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment