-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
DOC: Remove auto_close option form read_hdf #10330
Conversation
hmm, this should be hit in the iterator, or if you pass an open store to |
It doesn't have a There is also another problem if a buffer is passed - there is no code path for a buffer since the |
I could probably improve it to handle an open store (although why one would want to use |
I think it should handle an open store (and not close it), that is the key. But of its not tested. So for now, let's put a test that hits that path (and you can raise Since this hasn't been hit in real code, either it works (maybe) or raises some weird error. Either way its not tested. |
6bfd6d3
to
f33f625
Compare
It now checks and also raises if a generic buffer type is passed. Added test for each. |
@@ -4669,6 +4669,49 @@ def test_to_hdf_with_object_column_names(self): | |||
result = pd.read_hdf(path, 'df', where="index = [{0}]".format(df.index[0])) | |||
assert(len(result)) | |||
|
|||
def test_read_hdf_open_store(self): | |||
df = DataFrame(np.random.rand(4, 5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put the issues in a comment here
lgtm. minor comment ping when green. |
2c47156
to
3245c00
Compare
Remove docstring indicating auto_close can be used in read_hdf. This value is always ignored. Also correctly implements support for passing open HDFStores. Adds error handling for unknown buffer-types. xref pandas-dev#9327
3245c00
to
3d3a380
Compare
merged via 51047d4 |
Remove docstring indicating auto_close can be used in read_hdf.
This value is always ignored.
Also removes unreachable code.
xref #9327