Suggestion/Discussion: read_hdf · Issue #7715 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
At the moment read_hdf
is implemented such way that it opens HDFStore connection immediately when it is called. If the file does not exist, then it creates an HDF file and then throws KeyError
. There are two side effects:
- You can not distinguish situation when the file does not exist from situation when the key does not exist in the file
- If you have a typo in the filename, empty file is created -> polluting directory
I suggest to check if the file exist before and throw IOError
if it does not.