-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
ERR: disallow read_hdf mode='w' #13623
Comments
this is just a passed thru argument (not in the doc-string). No checking is done on mode. Addtl args are passed thru to PyTables to support various forms of opening stores (e.g. in-memory). I suppose it could be checked, though this will be quite tricky. Stores are allowed to be opened in multiple processes in append/read-only mode. So I guess 'w' could be disallowed if mode is supplied. But passing tests will be a bit tricky. a pull-request would be appreciated. |
I'll be happy to give it a try. However, this is the first time that I'm contributing to pandas, so I might need some guidance. Am I correct that the check for mode='w' should be added to the |
add as another named argument in contributing docs are here |
Passing
mode='w'
topd.read_hdf
erases the target file immediately.I believe this behavior is undesired, because deleting data is a side effect that no method called
read_anything
should have. The fact that a mode argument is even accepted is not documented anywhere. I just lost some experimental data this way, no backup...Code Sample
Expected Output
output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 23.0.0
Cython: 0.24
numpy: 1.11.1
scipy: 0.17.1
statsmodels: 0.6.1
xarray: None
IPython: 4.2.0
sphinx: 1.4.1
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.6.0
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.2
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.40.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: