diff --git a/pandas/core/computation/eval.py b/pandas/core/computation/eval.py index 430daa4708001..461561a80a7e5 100644 --- a/pandas/core/computation/eval.py +++ b/pandas/core/computation/eval.py @@ -219,7 +219,7 @@ def eval( More backends may be available in the future. truediv : bool, optional - Whether to use true division, like in Python >= 3 + Whether to use true division, like in Python >= 3. local_dict : dict or None, optional A dictionary of local variables, taken from locals() by default. global_dict : dict or None, optional diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index ee2f4e0f1e85d..e5cecd090e061 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -103,13 +103,13 @@ class DatetimeIndex(DatetimeIndexOpsMixin, Int64Index, DatetimeDelegateMixin): Parameters ---------- data : array-like (1-dimensional), optional - Optional datetime-like data to construct index with + Optional datetime-like data to construct index with. copy : bool - Make a copy of input ndarray + Make a copy of input ndarray. freq : str or pandas offset object, optional One of pandas date offset strings or corresponding objects. The string 'infer' can be passed in order to set the frequency of the index as the - inferred frequency upon creation + inferred frequency upon creation. start : starting value, datetime-like, optional If data is None, start is used as the start point in generating regular @@ -119,19 +119,19 @@ class DatetimeIndex(DatetimeIndexOpsMixin, Int64Index, DatetimeDelegateMixin): periods : int, optional, > 0 Number of periods to generate, if generating index. Takes precedence - over end argument + over end argument. .. deprecated:: 0.24.0 end : end time, datetime-like, optional If periods is none, generated index will extend to first conforming - time on or just past end argument + time on or just past end argument. .. deprecated:: 0.24.0 closed : str or None, default None Make the interval closed with respect to the given frequency to - the 'left', 'right', or both sides (None) + the 'left', 'right', or both sides (None). .. deprecated:: 0.24. 0 diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index dc2abfb0cb6eb..c99e42e48c346 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -882,13 +882,13 @@ def set_codes(self, codes, level=None, inplace=False, verify_integrity=True): Parameters ---------- codes : sequence or list of sequence - new codes to apply + New codes to apply. level : int, level name, or sequence of int/level names (default None) - level(s) to set (None for all levels) + Level(s) to set (None for all levels). inplace : bool - if True, mutates in place + If True, mutates in place. verify_integrity : bool (default True) - if True, checks that levels and codes are compatible + If True, checks that levels and codes are compatible. Returns ------- @@ -1717,7 +1717,7 @@ def to_hierarchical(self, n_repeat, n_shuffle=1): Parameters ---------- n_repeat : int - Number of times to repeat the labels on self + Number of times to repeat the labels on self. n_shuffle : int Controls the reordering of the labels. If the result is going to be an inner level in a MultiIndex, n_shuffle will need to be @@ -2335,11 +2335,11 @@ def sortlevel(self, level=0, ascending=True, sort_remaining=True): Parameters ---------- level : list-like, int or str, default 0 - If a string is given, must be a name of the level + If a string is given, must be a name of the level. If list-like must be names or ints of levels. ascending : bool, default True - False to sort in descending order - Can also be a list to specify a directed ordering + 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 Returns diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index 7e593ddb91d3a..ea334503a4302 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -359,7 +359,7 @@ def merge_asof( - If True, allow matching with the same 'on' value (i.e. less-than-or-equal-to / greater-than-or-equal-to) - If False, don't match the same 'on' value - (i.e., strictly less-than / strictly greater-than) + (i.e., strictly less-than / strictly greater-than). direction : 'backward' (default), 'forward', or 'nearest' Whether to search for prior, subsequent, or closest matches. diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index 2cc9f8927effb..a902c63e20e7d 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -296,7 +296,7 @@ def qcut(x, q, labels=None, retbins=False, precision=3, duplicates="raise"): Whether to return the (bins, labels) or not. Can be useful if bins is given as a scalar. precision : int, optional - The precision at which to store and display the bins labels + The precision at which to store and display the bins labels. duplicates : {default 'raise', 'drop'}, optional If bin edges are not unique, raise ValueError or drop non-uniques. diff --git a/pandas/core/tools/numeric.py b/pandas/core/tools/numeric.py index 05696ffd4605d..e59ed247bd87b 100644 --- a/pandas/core/tools/numeric.py +++ b/pandas/core/tools/numeric.py @@ -36,9 +36,9 @@ def to_numeric(arg, errors="raise", downcast=None): ---------- arg : scalar, list, tuple, 1-d array, or Series errors : {'ignore', 'raise', 'coerce'}, default 'raise' - - 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 + - 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 If not None, and if the data has been successfully cast to a numerical dtype (or if the data was numeric to begin with), diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 8574c9ad1d425..1f1ad55969d6f 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -552,9 +552,9 @@ class ExcelWriter(metaclass=abc.ABCMeta): ``io.excel..writer``. NOTE: can only be passed as a keyword argument. date_format : str, default None - Format string for dates written into Excel files (e.g. 'YYYY-MM-DD') + Format string for dates written into Excel files (e.g. 'YYYY-MM-DD'). datetime_format : str, default None - Format string for datetime objects written into Excel files + Format string for datetime objects written into Excel files. (e.g. 'YYYY-MM-DD HH:MM:SS') mode : {'w', 'a'}, default 'w' File mode to use (write or append). diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 94f863d8970f1..35e6d53127e59 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -1024,7 +1024,7 @@ def append( table(t) : table format Write as a PyTables Table structure which may perform worse but allow more flexible operations like searching - / selecting subsets of the data + / selecting subsets of the data. append : bool, default True Append the input data to the existing. data_columns : list of columns, or True, default None diff --git a/pandas/io/spss.py b/pandas/io/spss.py index 4f13349a819c3..cf682ec72f284 100644 --- a/pandas/io/spss.py +++ b/pandas/io/spss.py @@ -20,7 +20,7 @@ def read_spss( Parameters ---------- path : string or Path - File path + File path. usecols : list-like, optional Return a subset of the columns. If None, return all columns. convert_categoricals : bool, default is True diff --git a/pandas/io/sql.py b/pandas/io/sql.py index 820aeaeb11649..e90e19649f645 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -294,7 +294,7 @@ def read_sql_query( to pass parameters is database driver dependent. Check your database driver documentation for which of the five syntax styles, described in PEP 249's paramstyle, is supported. - Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'} + Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'}. parse_dates : list or dict, default: None - List of column names to parse as dates. - Dict of ``{column_name: format string}`` where format string is @@ -372,7 +372,7 @@ def read_sql( to pass parameters is database driver dependent. Check your database driver documentation for which of the five syntax styles, described in PEP 249's paramstyle, is supported. - Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'} + Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'}. parse_dates : list or dict, default: None - List of column names to parse as dates. - Dict of ``{column_name: format string}`` where format string is diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index 0dcd8aeb4df9b..beeef3811ae5d 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -222,7 +222,7 @@ def infer_freq(index, warn=True): Parameters ---------- index : DatetimeIndex or TimedeltaIndex - if passed a Series will use the values of the series (NOT THE INDEX) + if passed a Series will use the values of the series (NOT THE INDEX). warn : bool, default True Returns