Skip to content
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

PR06 doc string fixes #28946

Merged
merged 49 commits into from
Oct 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1229963
updated boolean to bool for api.extension.extensionarray methods
tolaa001 Oct 3, 2019
34db4a3
updating categorical.from codes args with type string to str and bool…
tolaa001 Oct 3, 2019
ad9e2ce
converting DatetimeLikeArrayMixin.value_count arg type from boolean t…
tolaa001 Oct 3, 2019
78d1853
converting methods in datetimelike module with string args to str
tolaa001 Oct 3, 2019
d0e9bd4
converting method arg types boolean to bool in integer.py
tolaa001 Oct 3, 2019
3b5347f
converting method arg types string to str in period.py
tolaa001 Oct 3, 2019
9b64f96
converting boolean to bool in docstring in cast.py
tolaa001 Oct 3, 2019
6fca012
converting boolean to bool in common.py
tolaa001 Oct 3, 2019
6535906
converting boolean to bool in concat.py
tolaa001 Oct 3, 2019
cd84668
converting string to str in dtypes.py
tolaa001 Oct 3, 2019
5828d24
converting boolean to bool in missing.py
tolaa001 Oct 3, 2019
26bbd72
Merge remote-tracking branch 'upstream/master' into more_doc_contribu…
tolaa001 Oct 6, 2019
1c33d6f
change to array-like of int
tolaa001 Oct 11, 2019
8b362d2
change to 'category' from the str 'category'
tolaa001 Oct 11, 2019
073e45f
changed / to ,
tolaa001 Oct 11, 2019
794e93c
Merge remote-tracking branch 'upstream/master' into more_doc_contribu…
tolaa001 Oct 11, 2019
a30457a
catrgorical fix
tolaa001 Oct 11, 2019
3ccd062
Merge remote-tracking branch 'upstream/master' into more_doc_contribu…
tolaa001 Oct 12, 2019
fb3690b
docstring fix for to_json method
tolaa001 Oct 12, 2019
90f04c9
docstring fix for unstack method
tolaa001 Oct 12, 2019
4cf387e
docstring fix for nunique method
tolaa001 Oct 12, 2019
e4bc525
docstring fix for indexer_at_time method
tolaa001 Oct 12, 2019
817b73d
docstring fix for sortlevel method
tolaa001 Oct 12, 2019
7f08a4b
docstring fix for to_frame method
tolaa001 Oct 12, 2019
3f8db1d
docstring fix for categoricalindex
tolaa001 Oct 12, 2019
8bdcddf
docstring fix for shift method
tolaa001 Oct 12, 2019
c535f45
docstring fix for eval method
tolaa001 Oct 12, 2019
9c43759
docstring fix for interval_rangemethod
tolaa001 Oct 12, 2019
452baf4
docstring fix for infer_freq method
tolaa001 Oct 12, 2019
46a83fc
docstring fix for to_numeric method
tolaa001 Oct 12, 2019
695350f
docstring fix for qcut method
tolaa001 Oct 12, 2019
f6f3606
docstring fix for readstata
tolaa001 Oct 12, 2019
ef33f1d
docstring fix for readstata
tolaa001 Oct 12, 2019
03f6a88
docstring fix for hdfstore.append
tolaa001 Oct 12, 2019
2836eae
docstring fix for read_sql
tolaa001 Oct 12, 2019
4e46f71
docstring fix for read_csv and read_table
tolaa001 Oct 12, 2019
724d887
docstring fix for read_json
tolaa001 Oct 12, 2019
6b3706b
eval.py docs updated
tolaa001 Oct 13, 2019
84edcb4
eval.py docs for engine updated
tolaa001 Oct 13, 2019
b3b9407
to_numeric.py docs updated
tolaa001 Oct 13, 2019
06559f7
append.py docs for append updated
tolaa001 Oct 13, 2019
79dfacb
append.py docs for dropna updated
tolaa001 Oct 13, 2019
dcf7515
stata.py docs updated
tolaa001 Oct 13, 2019
55ff790
pep8 fix
tolaa001 Oct 13, 2019
c110b5a
remove optional from eval.py docstring
tolaa001 Oct 13, 2019
466b179
updating docstring for qcut method
tolaa001 Oct 13, 2019
b9193f8
remove comma from read_json
tolaa001 Oct 13, 2019
4c391d6
updating docs for append method
tolaa001 Oct 13, 2019
754939c
Merge remote-tracking branch 'upstream/master' into more_doc_contribu…
tolaa001 Oct 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/computation/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ def eval(
<https://docs.python.org/3/reference/simple_stmts.html#simple-statements>`__,
only Python `expressions
<https://docs.python.org/3/reference/simple_stmts.html#expression-statements>`__.
parser : string, default 'pandas', {'pandas', 'python'}
parser : {'pandas', 'python'}, default 'pandas'
The parser to use to construct the syntax tree from the expression. The
default of ``'pandas'`` parses code slightly different than standard
Python. Alternatively, you can parse an expression using the
``'python'`` parser to retain strict Python semantics. See the
:ref:`enhancing performance <enhancingperf.eval>` documentation for
more details.
engine : string or None, default 'numexpr', {'python', 'numexpr'}
engine : {'python', 'numexpr'}, default 'numexpr'

The engine used to evaluate the expression. Supported engines are

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6238,7 +6238,7 @@ def unstack(self, level=-1, fill_value=None):
----------
level : int, str, or list of these, default -1 (last level)
Level(s) of index to unstack, can pass level name.
fill_value : int, string or dict
fill_value : int, str or dict
Replace NaN with this value if the unstack produces missing values.

Returns
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2353,7 +2353,7 @@ def to_json(

.. versionadded:: 0.23.0

indent : integer, optional
indent : int, optional
Length of whitespace used to indent each record.

.. versionadded:: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ def nunique(self, dropna=True):

Parameters
----------
dropna : boolean, default True
dropna : bool, default True
Don't include NaN in the counts.

Returns
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4531,7 +4531,7 @@ def shift(self, periods=1, freq=None):
periods : int, default 1
Number of periods (or increments) to shift by,
can be positive or negative.
freq : pandas.DateOffset, pandas.Timedelta or string, optional
freq : pandas.DateOffset, pandas.Timedelta or str, optional
Frequency increment to shift by.
If None, the index is shifted by its own `freq` attribute.
Offset aliases are valid strings, e.g., 'D', 'W', 'M' etc.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CategoricalIndex(Index, accessor.PandasDelegate):
Whether or not this categorical is treated as an ordered
categorical. If not given here or in `dtype`, the resulting
categorical will be unordered.
dtype : CategoricalDtype or the string "category", optional
dtype : CategoricalDtype or "category", optional
If :class:`CategoricalDtype`, cannot be used together with
`categories` or `ordered`.

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ def indexer_at_time(self, time, asof=False):

Parameters
----------
time : datetime.time or string
time : datetime.time or str
datetime.time or string in appropriate format ("%H:%M", "%H%M",
"%I:%M%p", "%I%M%p", "%H:%M:%S", "%H%M%S", "%I:%M:%S%p",
"%I%M%S%p").
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,11 +1412,11 @@ def interval_range(
Right bound for generating intervals
periods : int, default None
Number of periods to generate
freq : numeric, string, or DateOffset, default None
freq : numeric, str, or DateOffset, default None
The length of each interval. Must be consistent with the type of start
and end, e.g. 2 for numeric, or '5H' for datetime-like. Default is 1
for numeric and 'D' for datetime-like.
name : string, default None
name : str, default None
Name of the resulting IntervalIndex
closed : {'left', 'right', 'both', 'neither'}, default 'right'
Whether the intervals are closed on the left-side, right-side, both
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ def to_frame(self, index=True, name=None):

Parameters
----------
index : boolean, default True
index : bool, default True
Set the index of the returned DataFrame as the original MultiIndex.

name : list / sequence of strings, optional
Expand Down Expand Up @@ -2334,7 +2334,7 @@ def sortlevel(self, level=0, ascending=True, sort_remaining=True):
level : list-like, int or str, default 0
If a string is given, must be a name of the level
If list-like must be names or ints of levels.
ascending : boolean, default True
ascending : bool, default True
False to sort in descending order
Can also be a list to specify a directed ordering
sort_remaining : sort by the remaining levels after level
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/reshape/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ def qcut(x, q, labels=None, retbins=False, precision=3, duplicates="raise"):
Parameters
----------
x : 1d ndarray or Series
q : integer or array of quantiles
q : int or list-like of int
Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately
array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles
labels : array or boolean, default None
labels : array or bool, default None
Used as labels for the resulting bins. Must be of the same length as
the resulting bins. If False, return only integer indicators of the
bins.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/tools/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def to_numeric(arg, errors="raise", downcast=None):
- If 'raise', then invalid parsing will raise an exception
- If 'coerce', then invalid parsing will be set as NaN
- If 'ignore', then invalid parsing will return the input
downcast : {'integer', 'signed', 'unsigned', 'float'} , default None
downcast : {'integer', 'signed', 'unsigned', 'float'}, default None
If not None, and if the data has been successfully cast to a
numerical dtype (or if the data was numeric to begin with),
downcast that resulting data to the smallest numerical dtype
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/json/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def read_json(
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``.
orient : string,
orient : str
Indication of expected JSON string format.
Compatible JSON strings can be produced by ``to_json()`` with a
corresponding orient value.
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
arguments.
dayfirst : bool, default False
DD/MM format dates, international and European format.
cache_dates : boolean, default True
cache_dates : bool, default True
If True, use a cache of unique, converted dates to apply the datetime
conversion. May produce significant speed-up when parsing duplicate
date strings, especially ones with timezone offsets.
Expand Down
9 changes: 5 additions & 4 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ def append(
Write as a PyTables Table structure which may perform
worse but allow more flexible operations like searching
/ selecting subsets of the data
append : boolean, default True, append the input data to the
existing
append : bool, default True
Append the input data to the existing.
data_columns : list of columns, or True, default None
List of columns to create as indexed data columns for on-disk
queries, or True to use all columns. By default only the axes
Expand All @@ -1037,8 +1037,9 @@ def append(
chunksize : size to chunk the writing
expectedrows : expected TOTAL row size of this table
encoding : default None, provide an encoding for strings
dropna : boolean, default False, do not write an ALL nan row to
the store settable by the option 'io.hdf.dropna_table'
dropna : bool, default False
Do not write an ALL nan row to the store settable
by the option 'io.hdf.dropna_table'.

Notes
-----
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def read_sql_query(
If a DBAPI2 object, only sqlite3 is supported.
index_col : string or list of strings, optional, default: None
Column(s) to set as index(MultiIndex).
coerce_float : boolean, default True
coerce_float : bool, default True
Attempts to convert values of non-string, non-numeric objects (like
decimal.Decimal) to floating point. Useful for SQL result sets.
params : list, tuple or dict, optional, default: None
Expand Down
16 changes: 8 additions & 8 deletions pandas/io/stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,31 @@
)

_statafile_processing_params1 = """\
convert_dates : boolean, defaults to True
convert_dates : bool, default True
Convert date variables to DataFrame time values.
convert_categoricals : boolean, defaults to True
convert_categoricals : bool, default True
Read value labels and convert columns to Categorical/Factor variables."""

_encoding_params = """\
encoding : string, None or encoding
encoding : str, None or encoding
Encoding used to parse the files. None defaults to latin-1."""

_statafile_processing_params2 = """\
index_col : string, optional, default: None
index_col : str, optional
Column to set as index.
convert_missing : boolean, defaults to False
convert_missing : bool, default False
Flag indicating whether to convert missing values to their Stata
representations. If False, missing values are replaced with nan.
If True, columns containing missing values are returned with
object data types and missing values are represented by
StataMissingValue objects.
preserve_dtypes : boolean, defaults to True
preserve_dtypes : bool, default True
Preserve Stata datatypes. If False, numeric data are upcast to pandas
default types for foreign data (float64 or int64).
columns : list or None
Columns to retain. Columns will be returned in the given order. None
returns all columns.
order_categoricals : boolean, defaults to True
order_categoricals : bool, default True
Flag indicating whether converted categorical data are ordered."""

_chunksize_params = """\
Expand All @@ -86,7 +86,7 @@
given number of lines."""

_iterator_params = """\
iterator : boolean, default False
iterator : bool, default False
Return StataReader object."""

_read_stata_doc = """
Expand Down
2 changes: 1 addition & 1 deletion pandas/tseries/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def infer_freq(index, warn=True):
----------
index : DatetimeIndex or TimedeltaIndex
if passed a Series will use the values of the series (NOT THE INDEX)
warn : boolean, default True
warn : bool, default True

Returns
-------
Expand Down