Skip to content

BUG/TST raise a more detailed error when GH6169 occurs, added a test #6200

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

Closed
wants to merge 1 commit into from
Closed

Conversation

glyg
Copy link
Contributor

@glyg glyg commented Jan 31, 2014

Raise a detailed error when a columns argument is passed through 'where' to
select a multiIndexed Dataframe from an HDF store. Wrote a test
showcasing the bug

modified:   pandas/io/pytables.py
modified:   pandas/io/tests/test_pytables.py

Raise a detailed error when a `columns` argument is passed through 'where' to
select a multiIndexed Dataframe from an HDF store. Wrote a test
showcasing the bug

	modified:   pandas/io/pytables.py
	modified:   pandas/io/tests/test_pytables.py

making it work
name='A')
with ensure_clean_store(self.path) as store:
store.put('s', s)
tm.assert_frame_equal(store.select('s', where="columns=['A']"),s,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this should work like that... It is kind of absurd to pass a columns argument to select data from a Series object, so maybe that should rise an error (actually even if columns is passed as an argument to select directly an error should occur).

@jreback
Copy link
Contributor

jreback commented Jan 31, 2014

closing in favor of #6202

@glyg I took your tests and fixed the issue, was a bit non-trivial as the column selection is done in a non obvious way

thanks!

@jreback jreback closed this Jan 31, 2014
@glyg
Copy link
Contributor Author

glyg commented Jan 31, 2014

you're welcome!

@jreback
Copy link
Contributor

jreback commented Jan 31, 2014

and as always...pls report any further issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants