-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: Reword doc for filepath_or_buffer in read_csv #22058
DOC: Reword doc for filepath_or_buffer in read_csv #22058
Conversation
Hello @gfyoung! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on July 26, 2018 at 08:37 Hours UTC |
45a1517
to
1599a73
Compare
pandas/io/parsers.py
Outdated
If you want to pass in a path object, pandas accepts the following: | ||
|
||
* pathlib.Path | ||
* py._path.local.LocalPath |
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.
Is this supposed to be private? Not familiar with this but if that's the case don't feel like its worth mention here
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.
The alias is py.path.local
, so it is in fact public. However, the alias resolves to that "private class", so no need to provide indirection for something like this.
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.
Then I would use the public alias? or do they use it like that as well in their documentation?
Since it are only two, I would maybe put it in a normal paragraph instead of the bullet points (now it seems to get more weight than the other paragraphs)
Codecov Report
@@ Coverage Diff @@
## master #22058 +/- ##
=======================================
Coverage 92.02% 92.02%
=======================================
Files 170 170
Lines 50710 50710
=======================================
Hits 46664 46664
Misses 4046 4046
Continue to review full report at Codecov.
|
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.
A big improvement anyhow!
pandas/io/parsers.py
Outdated
The string could be a URL. Valid URL schemes include http, ftp, s3, and | ||
file. For file URLs, a host is expected. For instance, a local file could | ||
be file://localhost/path/to/table.csv | ||
filepath_or_buffer : str, path object, or file object |
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.
maybe "file-like" instead of "file" ? as eg StringIO is not really a actual file
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.
Then I would use the public alias? or do they use it like that as well in their documentation?
https://py.readthedocs.io/en/latest/path.html
py._path.local.LocalPath
is the official class in the docs AFAICT. IMO, the naming makes it clearer that it's a class (vs. the all-lowercase py.path.local
)
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.
OK, if they use it like that, that's fine
pandas/io/parsers.py
Outdated
If you want to pass in a path object, pandas accepts the following: | ||
|
||
* pathlib.Path | ||
* py._path.local.LocalPath |
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.
Then I would use the public alias? or do they use it like that as well in their documentation?
Since it are only two, I would maybe put it in a normal paragraph instead of the bullet points (now it seems to get more weight than the other paragraphs)
Shortens dtype description following colon and moves it to a more expanded parameter description. Closes pandas-devgh-22057.
1599a73
to
92cc578
Compare
@jreback @jorisvandenbossche : Made the requested changes, and all is green. PTAL. |
Thanks! |
* master: BENCH: asv csv reading benchmarks no longer read StringIO objects off the end (pandas-dev#21807) BUG: df.agg, df.transform and df.apply use different methods when axis=1 than when axis=0 (pandas-dev#21224) BUG: bug in GroupBy.count where arg minlength passed to np.bincount must be None for np<1.13 (pandas-dev#21957) CLN: Vbench to asv conversion script (pandas-dev#22089) consistent docstring (pandas-dev#22066) TST: skip pytables test with not-updated pytables conda package (pandas-dev#22099) CLN: Remove Legacy MultiIndex Index Compatibility (pandas-dev#21740) DOC: Reword doc for filepath_or_buffer in read_csv (pandas-dev#22058) BUG: rolling with MSVC 2017 build (pandas-dev#21813)
Shortens dtype description following colon and moves it to a more expanded parameter description. Closes pandas-devgh-22057.
Shortens dtype description following colon and moves it to a more expanded parameter description.
Closes #22057.
cc @WillAyd