You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, using df.to_hdf('example.h5', 'my_hdf_table2', format='table', append=True) does result in appending, not overwriting.
Maybe this is a documentation issue not a code issue? Why do we have "mode = a" described as "append" if a separate non-default option "append = True" is still required for appending?
As always, thanks for all the work on a fantastic library.
The text was updated successfully, but these errors were encountered:
Kudos for noticing @MaxPowerWasTaken
And it's true what @jreback said, at the moment, the doc seems to be clear:
mode : {‘a’, ‘w’, ‘r+’}, default ‘a’
Mode to open file:
‘w’: write, a new file is created (an existing file with the same name would be deleted).
‘a’: append, an existing file is opened for reading and writing, and if the file does not exist it is created.
‘r+’: similar to ‘a’, but the file must already exist.
append : bool, default False
For Table formats, append the input data to the existing.
This seems to be the same issue as #4584 (#4584), but the issue seems to persist.
I'm using Pandas 0.19.1. The docs state that for to_hdf(), "mode = 'a' " means "Append; an existing file is opened for reading and writing"
http://pandas.pydata.org/pandas-docs/version/0.19.1/generated/pandas.DataFrame.to_hdf.html
But the following code example shows to_hdf(... mode='a') is overwriting, not appending
However, using
df.to_hdf('example.h5', 'my_hdf_table2', format='table', append=True)
does result in appending, not overwriting.Maybe this is a documentation issue not a code issue? Why do we have "mode = a" described as "append" if a separate non-default option "append = True" is still required for appending?
As always, thanks for all the work on a fantastic library.
The text was updated successfully, but these errors were encountered: