Skip to content

read_hdf not supporting pathlib.Path #11773

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
michaelaye opened this issue Dec 6, 2015 · 3 comments
Closed

read_hdf not supporting pathlib.Path #11773

michaelaye opened this issue Dec 6, 2015 · 3 comments
Labels
Compat pandas objects compatability with Numpy or Python functions IO HDF5 read_hdf, HDFStore Testing pandas testing functions or related to the test suite
Milestone

Comments

@michaelaye
Copy link
Contributor

According to the Enhancements text for 17.1:

pd.read_* functions can now also accept pathlib.Path, or py._path.local.LocalPath objects for the filepath_or_buffer argument. (GH11033)

all read_* functions should support pathlib.Path now. It works for me with read_csv but not for read_hdf.
Interestingly, I find in the squashed PR for this issue, 0d3dcbb, only a comment regarding read_csv and read_table, while the merge 82f0033 talks about read_*. Is there something missing for read_hdf ?

@jreback jreback added Testing pandas testing functions or related to the test suite IO HDF5 read_hdf, HDFStore Compat pandas objects compatability with Numpy or Python functions labels Dec 6, 2015
@jreback jreback added this to the Next Major Release milestone Dec 6, 2015
@jreback
Copy link
Contributor

jreback commented Dec 6, 2015

yeh, this was not tested on all of the IO formats. pretty sure that csv/excel/stat/msgpack/json should work as they all use the same io calls. HDF uses a slightly different one as it doesn't support reading from buffers in the same way.

So need tests for each of these formats (and not just the IO call itself) on read/to
HDF test/fix

cc @flying-sheep

@flying-sheep
Copy link
Contributor

jup, you told me

here is where all of this path inference is done (well not 100% sure of all but vast majority)

so it only was the vast majority, not all 😄

PS: the link is broken by now (tip: press y on some github page to get a canonical url so that this doesn’t happen anymore)

@michaelaye
Copy link
Contributor Author

to_csv also does not support pathlib.Path yet. (v0.17.1), while read_csv does, interestingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions IO HDF5 read_hdf, HDFStore Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants