-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
DOC: Updating the docstring of read_csv and related functions #23517
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
Changes from 3 commits
e7d3b09
692e67a
d0c2b40
18f5552
c0b7210
d84ffb2
5e85114
d0600f9
3f5fbcd
4e6f3a0
d2be9b9
237a024
63c6d84
5d7ff54
3a0a82a
bffda55
15aa9d1
84b8db9
97db816
5a95500
7732fbd
e4a2bdd
689a395
233e4ef
0720c8b
b19002b
0b0b072
5c8a3aa
b51c58a
ef3f38a
2bfa6ab
766d73f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,7 @@ | ||||||
| """ | ||||||
| Module contains tools for processing files into DataFrames or other objects | ||||||
| """ | ||||||
|
|
||||||
| from __future__ import print_function | ||||||
|
|
||||||
| from collections import defaultdict | ||||||
|
|
@@ -71,14 +72,6 @@ | |||||
| By file-like object, we refer to objects with a ``read()`` method, such as | ||||||
| a file handler (e.g. via builtin ``open`` function) or ``StringIO``. | ||||||
| %s | ||||||
| delim_whitespace : boolean, default False | ||||||
| Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be | ||||||
| used as the sep. Equivalent to setting ``sep='\s+'``. If this option | ||||||
| is set to True, nothing should be passed in for the ``delimiter`` | ||||||
| parameter. | ||||||
|
|
||||||
| .. versionadded:: 0.18.1 support for the Python parser. | ||||||
|
|
||||||
| header : int or list of ints, default 'infer' | ||||||
|
||||||
| header : int or list of ints, default 'infer' | |
| header : int, str or list of int, default 'infer' |
Outdated
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.
| converters : dict, default None | |
| converters : dict, optional |
Outdated
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.
| skiprows : list-like or int or callable, default None | |
| skiprows : list-like, int or callable, optional |
Outdated
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.
| chunksize : int, default None | |
| chunksize : int, optional |
Outdated
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.
| thousands : str, default None | |
| thousands : str, optional |
Outdated
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.
| dialect : str or csv.Dialect instance, default None | |
| dialect : str or csv.Dialect, optional |
datapythonista marked this conversation as resolved.
Show resolved
Hide resolved
Outdated
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.
| float_precision : str, default None | |
| float_precision : str, optional |
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.
@datapythonista Should I write a file like object to memory using io.StringIO() for the examples?
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 best option we found for showing functions that save to disk is df.to_csv('/tmp/data.csv') # doctest: +SKIP.
I'm not sure when reading, I think there is a directory with some files that are used for that. Can you take a look? Or may be @TomAugspurger can help.
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.
Not sure what's best here. We could make an HTTP request to https://github.com/pandas-dev/pandas/blob/master/doc/data/tips.csv, but I'd rather avoid that on every test run. I'm fine with just skipping.
Outdated
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.
| result : DataFrame or TextParser""" | |
| DataFrame or TextParser""" |
Outdated
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.
| Alternative argument name for sep. | |
| Alias for sep. |
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.
yeah changing these to use named paramaters with .format() would be good
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.
I think it'd be better to name all the
%s. Having them positional ames things a bit difficult to follow, at least for me.