-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: Should this raise an error or a warning in HDFStore? #4189
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
Comments
This is definitely a confusing error and error message. Is there a reason that someone would want to have a "Storer" vs. a table? (i.e., why is the default to create something that can't be queried later on...speed?) Why is the default not to store it in PyTables format? You definitely can't just emit a warning, because ignoring the where clause potentially means (unintentionally) loading a big database into memory. I'm not convinced this is a In [7]: pd.read_hdf('test_storer.h5','df',where='index>5')
TypeError: Basic HDF5 tables cannot be queried with a 'where' clause. Either do not supply a where clause or load from a 'PyTable' instead (e.g., HDF5 data created using 'to_hdf(...table=True)). You probably also need to document this better, given that the only time
|
I never actually use These are both there is a speed difference (mainly in writing) and they are written in different formats. |
actually this is documented pretty well in the doc strings. what exactly do you find confusing about it? |
@jreback now that you've explained, it's a bit clearer. I went to the IOTools section of the docs to try to understand what the difference is between the two of them. So, are all the examples with the actual HDFStore assuming that you are working with a |
You write:
Then why can you query one but not the other? All this said, maybe this is something that becomes really clear when you start to use the functionality. I have a really far removed view of it, since I haven't had the cause to use this (yet). |
yes...all are You can actually index into a With a The reason I brought this up is that I happen to sometimes write leaving it as an exception....maybe i'll update the error message a bit (and I think |
Agreed on raising the |
Yeah, I've got no insight into what other people do with PyTables :P |
Heres the doc update, should be more clear (This renders nicely, but can't seem to paste it here)
|
that's much clearer - looks good! On Thu, Jul 11, 2013 at 7:54 PM, jreback [email protected] wrote:
|
Currently in 0.12.
Selecting from a table is good with or without a where
This raises if where is not None, the theory being that passing a non-None where was a mistake.
However, then you have to a-prior know if you are dealing with a
Storer
or aTable
make this a warning instead?
The text was updated successfully, but these errors were encountered: