-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: pd.read_csv doc-string clarification #11555 #11756
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
Conversation
what exactly changed here? |
can you verify that these are in numpy-doc format, see here mostly it comes down to a parameter like:
|
|
In terms of what was changed: I updated the IO Tools description of I can go through and make any changes to put the doc string in numpy format, would you prefer that as a separate PR and/or should I drop the IO Tools doc changes? |
@frankcleary thanks. can you enumerate what changed (here), though. just for my edification. yes, would like to conform to numpy-doc in this PR. |
Makes sense, I'll do that and update this PR later this week. |
@jreback The list is in io.rst, not in the docstring. So I think it does not need to follow the numpy-doc format? |
@jorisvandenbossche hmm, good point. I am not sure what we actually do as we don't have too many places where we go thru the args of functions. is there a consistent pattern now (anywhere)? any reason not to use a doc-string format? |
The only other place I could find in the docs with a similar list of args is for |
@frankcleary the ideal thing would be to render the doc-strings in-line. as the out-of-syncness is annoying. Though if you simply want to fix it we can make that another issue. |
d605e50
to
8a7cf0b
Compare
@jorisvandenbossche how's this look to you |
Hmm, personally, if it looks exactly the same as the generated API page, I would just link to it rather than including it. |
so after seeing this, I think I agree with @jorisvandenbossche let's revert back to just an updated list (and hopefully we can keep this updated). @frankcleary can you update. |
Sure, I'll get to it this week. |
8a7cf0b
to
5945ca3
Compare
'round_trip' for the round-trip converter. | ||
- ``filepath_or_buffer``: str or file handle / | ||
:class:`python:io.StringIO`. The string could be a URL. Valid URL schemes | ||
include http, ftp, s3, and file. For file URLs, a host is expected. For |
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.
should we mention the LocalPath here as well? (its in the above)
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.
Fixed
@frankcleary looks good. couple of points. I would like to have the options in the same order as All that said the more important options should be closer to the front if at all possible (I think that is how we had it). e.g. things like So ok to reorg a bit (see if you can keep the code in sync as well). everything is passed by kw so that should be fine. Add a note in the whatsnew to say that the ordering of args was changed (in API section) as well. |
Makes sense, thanks. I will incorporate all those suggestions next weekend and post an update by Monday Jan. 18. |
Here's the order I'm thinking of in terms of logically organizing the arguments, along with the general idea behind the grouping I put them in. Any thoughts? Basicfilepath_or_buffer Column and index names and locationheader General parsing detailsdtype NA handlingna_values Date handlingparse_dates Iterationiterator Quoting and file formatcompression Errorserror_bad_lines |
@frankcleary a reorg like that would great! (note you can prob use the |
Thanks for this! One consideration:
|
Updated IO Tools documentation for read_csv() and read_table() to be consistent with the doc-string and reorded keyword arguements to group them more logically. Also updated concat docs in merging.rst to be consistent with doc-string.
5945ca3
to
4112c9f
Compare
Sorry, I was trying to push a clean history and it looks things are finished for this PR (can't reopen on a closed PR with a force pushed branch). I opened a new one here: #12256 |
closes #11555
Updated IO Tools documentation for read_csv() and read_table() to be consistent with the doc-string.