Skip to content

Commit be87776

Browse files
Merge pull request #10968 from terrytangyuan/PR4
DOC: Added default values in parsers.py doc-string
2 parents 9bdae60 + 3135b0e commit be87776

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pandas/io/parsers.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ParserWarning(Warning):
5454
Skip spaces after delimiter
5555
escapechar : string (length 1), default None
5656
One-character string used to escape delimiter when quoting is QUOTE_NONE.
57-
dtype : Type name or dict of column -> type
57+
dtype : Type name or dict of column -> type, default None
5858
Data type for data or columns. E.g. {'a': np.float64, 'b': np.int32}
5959
(Unsupported with engine='python')
6060
compression : {'gzip', 'bz2', 'infer', None}, default 'infer'
@@ -65,7 +65,7 @@ class ParserWarning(Warning):
6565
dialect : string or csv.Dialect instance, default None
6666
If None defaults to Excel dialect. Ignored if sep longer than 1 char
6767
See csv.Dialect documentation for more details
68-
header : int, list of ints
68+
header : int, list of ints, default 'infer'
6969
Row number(s) to use as the column names, and the start of the
7070
data. Defaults to 0 if no ``names`` passed, otherwise ``None``. Explicitly
7171
pass ``header=0`` to be able to replace existing names. The header can be
@@ -74,30 +74,30 @@ class ParserWarning(Warning):
7474
skipped (e.g. 2 in this example are skipped). Note that this parameter
7575
ignores commented lines and empty lines if ``skip_blank_lines=True``, so header=0
7676
denotes the first line of data rather than the first line of the file.
77-
skiprows : list-like or integer
77+
skiprows : list-like or integer, default None
7878
Line numbers to skip (0-indexed) or number of lines to skip (int)
7979
at the start of the file
8080
index_col : int or sequence or False, default None
8181
Column to use as the row labels of the DataFrame. If a sequence is given, a
8282
MultiIndex is used. If you have a malformed file with delimiters at the end
8383
of each line, you might consider index_col=False to force pandas to _not_
8484
use the first column as the index (row names)
85-
names : array-like
85+
names : array-like, default None
8686
List of column names to use. If file contains no header row, then you
8787
should explicitly pass header=None
8888
prefix : string, default None
8989
Prefix to add to column numbers when no header, e.g 'X' for X0, X1, ...
9090
na_values : str, list-like or dict, default None
9191
Additional strings to recognize as NA/NaN. If dict passed, specific
9292
per-column NA values
93-
true_values : list
93+
true_values : list, default None
9494
Values to consider as True
95-
false_values : list
95+
false_values : list, default None
9696
Values to consider as False
9797
keep_default_na : bool, default True
9898
If na_values are specified and keep_default_na is False the default NaN
9999
values are overridden, otherwise they're appended to
100-
parse_dates : boolean, list of ints or names, list of lists, or dict
100+
parse_dates : boolean, list of ints or names, list of lists, or dict, default False
101101
If True -> try parsing the index.
102102
If [1, 2, 3] -> try parsing columns 1, 2, 3 each as a separate date column.
103103
If [[1, 3]] -> combine columns 1 and 3 and parse as a single date column.
@@ -106,7 +106,7 @@ class ParserWarning(Warning):
106106
keep_date_col : boolean, default False
107107
If True and parse_dates specifies combining multiple columns then
108108
keep the original columns.
109-
date_parser : function
109+
date_parser : function, default None
110110
Function to use for converting a sequence of string columns to an
111111
array of datetime instances. The default uses dateutil.parser.parser
112112
to do the conversion. Pandas will try to call date_parser in three different
@@ -154,7 +154,7 @@ class ParserWarning(Warning):
154154
Detect missing value markers (empty strings and the value of na_values). In
155155
data without any NAs, passing na_filter=False can improve the performance
156156
of reading a large file
157-
usecols : array-like
157+
usecols : array-like, default None
158158
Return a subset of the columns.
159159
Results in much faster parsing time and lower memory usage.
160160
mangle_dupe_cols : boolean, default True

0 commit comments

Comments
 (0)