-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Read hdf does not close store #25863
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
Changes from 3 commits
e3a2930
4f765f7
ded7dd0
244cab4
a53b039
6cfb6d0
c90b047
341b6fb
de087c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1223,6 +1223,16 @@ def test_append_all_nans(self): | |
reloaded = read_hdf(path, 'df_with_missing') | ||
tm.assert_frame_equal(df_with_missing, reloaded) | ||
|
||
def test_read_missing_key_close_store(self): | ||
# GH 25766 | ||
with ensure_clean_path(self.path) as path: | ||
df = pd.DataFrame({'a': range(2), 'b': range(2)}) | ||
df.to_hdf(path, 'k1') | ||
|
||
pytest.raises(KeyError, pd.read_hdf, path, 'k2') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not an accepted format any longer, use the context manager
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated 244cab4 . But with form There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep this happens to be the last file - i think it’s fixed in another PR |
||
|
||
jreback marked this conversation as resolved.
Show resolved
Hide resolved
|
||
df.to_hdf(path, 'k2') | ||
|
||
def test_append_frame_column_oriented(self): | ||
|
||
with ensure_clean_store(self.path) as store: | ||
|
Uh oh!
There was an error while loading. Please reload this page.