From 80a094c10a259ec0d138ce0dc3bddddc65e65d4f Mon Sep 17 00:00:00 2001 From: Pek Date: Sun, 11 Nov 2018 08:37:38 -0500 Subject: [PATCH 1/3] pandas refs 23630, partial. --- pandas/core/accessor.py | 2 +- pandas/core/arrays/categorical.py | 18 +++--- pandas/core/arrays/datetimes.py | 6 +- pandas/core/arrays/interval.py | 36 +++++------ pandas/core/arrays/period.py | 4 +- pandas/core/base.py | 4 +- pandas/core/dtypes/inference.py | 2 +- pandas/core/dtypes/missing.py | 4 +- pandas/core/frame.py | 82 ++++++++++++------------ pandas/core/generic.py | 96 ++++++++++++++--------------- pandas/core/groupby/groupby.py | 6 +- pandas/core/indexes/base.py | 44 ++++++------- pandas/core/indexes/datetimelike.py | 10 +-- pandas/core/indexes/datetimes.py | 8 +-- pandas/core/indexes/frozen.py | 2 +- pandas/core/indexes/interval.py | 2 +- pandas/core/indexes/multi.py | 24 ++++---- pandas/core/indexes/numeric.py | 2 +- pandas/core/indexes/period.py | 8 +-- pandas/core/indexes/range.py | 4 +- pandas/core/indexes/timedeltas.py | 6 +- pandas/core/indexing.py | 18 +++--- pandas/core/series.py | 42 ++++++------- pandas/core/strings.py | 22 +++---- pandas/core/window.py | 82 ++++++++++++------------ pandas/io/json/table_schema.py | 4 +- pandas/io/pytables.py | 4 +- pandas/io/sql.py | 2 +- pandas/io/stata.py | 4 +- pandas/plotting/_core.py | 4 +- pandas/plotting/_misc.py | 2 +- pandas/util/_validators.py | 4 +- 32 files changed, 279 insertions(+), 279 deletions(-) diff --git a/pandas/core/accessor.py b/pandas/core/accessor.py index 6694737737562..d178c66da2cc1 100644 --- a/pandas/core/accessor.py +++ b/pandas/core/accessor.py @@ -247,7 +247,7 @@ def plot(self): >>> ds.geo.plot() # plots data on a map -See also +See Also -------- %(others)s """ diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 4363f3ccb14e2..4150c64689da4 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -315,8 +315,8 @@ class Categorical(ExtensionArray, PandasObject): See also -------- - pandas.api.types.CategoricalDtype : Type for categorical data - CategoricalIndex : An Index with an underlying ``Categorical`` + pandas.api.types.CategoricalDtype : Type for categorical data. + CategoricalIndex : An Index with an underlying ``Categorical``. """ # For comparisons, so that numpy uses our implementation if the compare @@ -1366,9 +1366,9 @@ def isna(self): See also -------- - isna : top-level isna - isnull : alias of isna - Categorical.notna : boolean inverse of Categorical.isna + isna : Top-level isna. + isnull : Alias of isna. + Categorical.notna : Boolean inverse of Categorical.isna. """ @@ -1389,9 +1389,9 @@ def notna(self): See also -------- - notna : top-level notna - notnull : alias of notna - Categorical.isna : boolean inverse of Categorical.notna + notna : Top-level notna. + notnull : Alias of notna. + Categorical.isna : Boolean inverse of Categorical.notna. """ return ~self.isna() @@ -2371,7 +2371,7 @@ def isin(self, values): See Also -------- - pandas.Series.isin : equivalent method on Series + pandas.Series.isin : Equivalent method on Series. Examples -------- diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index a6f688fb0cf7a..00e37108e06e8 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -566,7 +566,7 @@ def tz_convert(self, tz): See Also -------- - DatetimeIndex.tz : A timezone that has a variable offset from UTC + DatetimeIndex.tz : A timezone that has a variable offset from UTC. DatetimeIndex.tz_localize : Localize tz-naive DatetimeIndex to a given time zone, or remove timezone from a tz-aware DatetimeIndex. @@ -876,8 +876,8 @@ def to_period(self, freq=None): See also -------- - pandas.PeriodIndex: Immutable ndarray holding ordinal values - pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object + pandas.PeriodIndex: Immutable ndarray holding ordinal values. + pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object. """ from pandas.core.arrays import PeriodArray diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index 94be29893d2b9..90118cd300a22 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -94,11 +94,11 @@ See Also -------- -Index : The base pandas Index type -Interval : A bounded slice-like interval; the elements of an %(klass)s -interval_range : Function to create a fixed frequency IntervalIndex -cut : Bin values into discrete Intervals -qcut : Bin values into equal-sized Intervals based on rank or sample quantiles +Index : The base pandas Index type. +Interval : A bounded slice-like interval; the elements of an %(klass)s. +interval_range : Function to create a fixed frequency IntervalIndex. +cut : Bin values into discrete Intervals. +qcut : Bin values into equal-sized Intervals based on rank or sample quantiles. """ @@ -244,9 +244,9 @@ def _from_factorized(cls, values, original): See Also -------- - interval_range : Function to create a fixed frequency IntervalIndex - %(klass)s.from_arrays : Construct from a left and right array - %(klass)s.from_tuples : Construct from a sequence of tuples + interval_range : Function to create a fixed frequency IntervalIndex. + %(klass)s.from_arrays : Construct from a left and right array. + %(klass)s.from_tuples : Construct from a sequence of tuples. """ @classmethod @@ -354,13 +354,13 @@ def from_arrays(cls, left, right, closed='right', copy=False, dtype=None): See Also -------- - interval_range : Function to create a fixed frequency IntervalIndex + interval_range : Function to create a fixed frequency IntervalIndex. %(klass)s.from_arrays : Construct an %(klass)s from a left and - right array + right array. %(klass)s.from_breaks : Construct an %(klass)s from an array of - splits + splits. %(klass)s.from_tuples : Construct an %(klass)s from an - array-like of tuples + array-like of tuples. """ _interval_shared_docs['from_tuples'] = """ @@ -389,11 +389,11 @@ def from_arrays(cls, left, right, closed='right', copy=False, dtype=None): See Also -------- - interval_range : Function to create a fixed frequency IntervalIndex + interval_range : Function to create a fixed frequency IntervalIndex. %(klass)s.from_arrays : Construct an %(klass)s from a left and - right array + right array. %(klass)s.from_breaks : Construct an %(klass)s from an array of - splits + splits. """ @classmethod @@ -1027,9 +1027,9 @@ def repeat(self, repeats, **kwargs): See Also -------- - Index.repeat : Equivalent function for Index - Series.repeat : Equivalent function for Series - numpy.repeat : Underlying implementation + Index.repeat : Equivalent function for Index. + Series.repeat : Equivalent function for Series. + numpy.repeat : Underlying implementation. """ left_repeat = self.left.repeat(repeats, **kwargs) right_repeat = self.right.repeat(repeats, **kwargs) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index b343d42ef3b7c..4a7a08efc19c7 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -146,8 +146,8 @@ class PeriodArray(dtl.DatetimeLikeArrayMixin, ExtensionArray): See Also -------- - period_array : Create a new PeriodArray - pandas.PeriodIndex : Immutable Index for period data + period_array : Create a new PeriodArray. + pandas.PeriodIndex : Immutable Index for period data. """ # array priority higher than numpy scalars __array_priority__ = 1000 diff --git a/pandas/core/base.py b/pandas/core/base.py index de368f52b6f00..b438d8b521d4a 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -1014,8 +1014,8 @@ def value_counts(self, normalize=False, sort=True, ascending=False, See Also -------- - Series.count: number of non-NA elements in a Series - DataFrame.count: number of non-NA elements in a DataFrame + Series.count: Number of non-NA elements in a Series. + DataFrame.count: Number of non-NA elements in a DataFrame. Examples -------- diff --git a/pandas/core/dtypes/inference.py b/pandas/core/dtypes/inference.py index 5f35a040d7d47..241a1b471f677 100644 --- a/pandas/core/dtypes/inference.py +++ b/pandas/core/dtypes/inference.py @@ -44,7 +44,7 @@ def is_number(obj): See Also -------- - pandas.api.types.is_integer: checks a subgroup of numbers + pandas.api.types.is_integer: Checks a subgroup of numbers. Examples -------- diff --git a/pandas/core/dtypes/missing.py b/pandas/core/dtypes/missing.py index a12985bb7d42c..fa60c326a19ea 100644 --- a/pandas/core/dtypes/missing.py +++ b/pandas/core/dtypes/missing.py @@ -43,7 +43,7 @@ def isna(obj): See Also -------- - notna : boolean inverse of pandas.isna. + notna : Boolean inverse of pandas.isna. Series.isna : Detect missing values in a Series. DataFrame.isna : Detect missing values in a DataFrame. Index.isna : Detect missing values in an Index. @@ -274,7 +274,7 @@ def notna(obj): See Also -------- - isna : boolean inverse of pandas.notna. + isna : Boolean inverse of pandas.notna. Series.notna : Detect valid values in a Series. DataFrame.notna : Detect valid values in a DataFrame. Index.notna : Detect valid values in an Index. diff --git a/pandas/core/frame.py b/pandas/core/frame.py index f8d153327f135..10601bb5b45c6 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -221,9 +221,9 @@ See Also -------- -merge_ordered : merge with optional filling/interpolation. -merge_asof : merge on nearest keys. -DataFrame.join : similar method using indices. +merge_ordered : Merge with optional filling/interpolation. +merge_asof : Merge on nearest keys. +DataFrame.join : Similar method using indices. Examples -------- @@ -346,12 +346,12 @@ class DataFrame(NDFrame): 1 4 5 6 2 7 8 9 - See also + See Also -------- - DataFrame.from_records : constructor from tuples, also record arrays - DataFrame.from_dict : from dicts of Series, arrays, or dicts - DataFrame.from_items : from sequence of (key, value) pairs - pandas.read_csv, pandas.read_table, pandas.read_clipboard + DataFrame.from_records : Constructor from tuples, also record arrays. + DataFrame.from_dict : From dicts of Series, arrays, or dicts. + DataFrame.from_items : From sequence of (key, value) pairs + pandas.read_csv, pandas.read_table, pandas.read_clipboard. """ @property @@ -1066,8 +1066,8 @@ def from_dict(cls, data, orient='columns', dtype=None, columns=None): See Also -------- DataFrame.from_records : DataFrame from ndarray (structured - dtype), list of tuples, dict, or DataFrame - DataFrame : DataFrame object creation using constructor + dtype), list of tuples, dict, or DataFrame. + DataFrame : DataFrame object creation using constructor. Examples -------- @@ -1484,9 +1484,9 @@ def to_records(self, index=True, convert_datetime64=None): See Also -------- - DataFrame.from_records: convert structured or record ndarray + DataFrame.from_records: Convert structured or record ndarray to DataFrame. - numpy.recarray: ndarray that allows field access using + numpy.recarray: An ndarray that allows field access using attributes, analogous to typed columns in a spreadsheet. @@ -1694,7 +1694,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, datetime format based on the first datetime string. If the format can be inferred, there often will be a large parsing speed-up. - See also + See Also -------- pandas.read_csv @@ -1918,9 +1918,9 @@ def to_stata(self, fname, convert_dates=None, write_index=True, See Also -------- - pandas.read_stata : Import Stata data files - pandas.io.stata.StataWriter : low-level writer for Stata data files - pandas.io.stata.StataWriter117 : low-level writer for version 117 files + pandas.read_stata : Import Stata data files. + pandas.io.stata.StataWriter : Low-level writer for Stata data files. + pandas.io.stata.StataWriter117 : Low-level writer for version 117 files. Examples -------- @@ -3744,9 +3744,9 @@ def drop(self, labels=None, axis=0, index=None, columns=None, -------- DataFrame.loc : Label-location based indexer for selection by label. DataFrame.dropna : Return DataFrame with labels on given axis omitted - where (all or any) data are missing + where (all or any) data are missing. DataFrame.drop_duplicates : Return DataFrame with duplicate rows - removed, optionally only considering certain columns + removed, optionally only considering certain columns. Series.drop : Return Series with specified index labels removed. Raises @@ -4698,7 +4698,7 @@ def nlargest(self, n, columns, keep='first'): -------- DataFrame.nsmallest : Return the first `n` rows ordered by `columns` in ascending order. - DataFrame.sort_values : Sort DataFrame by the values + DataFrame.sort_values : Sort DataFrame by the values. DataFrame.head : Return the first `n` rows without re-ordering. Notes @@ -5085,7 +5085,7 @@ def combine(self, other, func, fill_value=None, overwrite=True): See Also -------- DataFrame.combine_first : Combine two DataFrame objects and default to - non-null values in frame calling the method + non-null values in frame calling the method. """ other_idxlen = len(other.index) # save for compare @@ -5191,7 +5191,7 @@ def combine_first(self, other): See Also -------- DataFrame.combine : Perform series-wise operation on two DataFrames - using a given function + using a given function. """ import pandas.core.computation.expressions as expressions @@ -5403,9 +5403,9 @@ def update(self, other, join='left', overwrite=True, filter_func=None, See Also -------- - DataFrame.pivot_table : generalization of pivot that can handle + DataFrame.pivot_table : Generalization of pivot that can handle duplicate values for one index/column pair. - DataFrame.unstack : pivot based on the index values instead of a + DataFrame.unstack : Pivot based on the index values instead of a column. Notes @@ -5589,10 +5589,10 @@ def pivot(self, index=None, columns=None, values=None): ------- table : DataFrame - See also + See Also -------- - DataFrame.pivot : pivot without aggregation that can handle - non-numeric data + DataFrame.pivot : Pivot without aggregation that can handle + non-numeric data. """ @Substitution('') @@ -5864,7 +5864,7 @@ def unstack(self, level=-1, fill_value=None): col_level : int or string, optional If columns are a MultiIndex then use this level to melt. - See also + See Also -------- %(other)s pivot_table @@ -6241,9 +6241,9 @@ def apply(self, func, axis=0, broadcast=None, raw=False, reduce=None, See also -------- - DataFrame.applymap: For elementwise operations - DataFrame.aggregate: only perform aggregating type operations - DataFrame.transform: only perform transforming type operations + DataFrame.applymap: For elementwise operations. + DataFrame.aggregate: Only perform aggregating type operations. + DataFrame.transform: Only perform transforming type operations. Examples -------- @@ -6350,7 +6350,7 @@ def applymap(self, func): See also -------- - DataFrame.apply : Apply a function along input axis of DataFrame + DataFrame.apply : Apply a function along input axis of DataFrame. Examples -------- @@ -6434,7 +6434,7 @@ def append(self, other, ignore_index=False, See also -------- pandas.concat : General function to concatenate DataFrame, Series - or Panel objects + or Panel objects. Examples -------- @@ -6901,10 +6901,10 @@ def cov(self, min_periods=None): See Also -------- - pandas.Series.cov : compute covariance with another Series - pandas.core.window.EWM.cov: exponential weighted sample covariance - pandas.core.window.Expanding.cov : expanding sample covariance - pandas.core.window.Rolling.cov : rolling sample covariance + pandas.Series.cov : Compute covariance with another Series. + pandas.core.window.EWM.cov: Exponential weighted sample covariance. + pandas.core.window.Expanding.cov : Expanding sample covariance. + pandas.core.window.Rolling.cov : Rolling sample covariance. Notes ----- @@ -7061,11 +7061,11 @@ def count(self, axis=0, level=None, numeric_only=False): See Also -------- - Series.count: number of non-NA elements in a Series - DataFrame.shape: number of DataFrame rows and columns (including NA - elements) - DataFrame.isna: boolean same-sized DataFrame showing places of NA - elements + Series.count: Number of non-NA elements in a Series. + DataFrame.shape: Number of DataFrame rows and columns (including NA + elements). + DataFrame.isna: Boolean same-sized DataFrame showing places of NA + elements. Examples -------- diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 34f25c5634d5b..10029b1ae8b81 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -852,8 +852,8 @@ def squeeze(self, axis=None): See Also -------- - Series.iloc : Integer-location based indexing for selecting scalars - DataFrame.iloc : Integer-location based indexing for selecting Series + Series.iloc : Integer-location based indexing for selecting scalars. + DataFrame.iloc : Integer-location based indexing for selecting Series. Series.to_frame : Inverse of DataFrame.squeeze for a single-column DataFrame. @@ -1164,9 +1164,9 @@ def rename_axis(self, mapper=None, **kwargs): See Also -------- - pandas.Series.rename : Alter Series index labels or name - pandas.DataFrame.rename : Alter DataFrame index labels or name - pandas.Index.rename : Set new names on index + pandas.Series.rename : Alter Series index labels or name. + pandas.DataFrame.rename : Alter DataFrame index labels or name. + pandas.Index.rename : Set new names on index. Examples -------- @@ -1848,7 +1848,7 @@ def empty(self): >>> df.dropna().empty True - See also + See Also -------- pandas.Series.dropna pandas.DataFrame.dropna @@ -2395,7 +2395,7 @@ def to_sql(self, name, con, schema=None, if_exists='fail', index=True, See Also -------- - pandas.read_sql : read a DataFrame from a table + pandas.read_sql : Read a DataFrame from a table. Notes ----- @@ -4977,8 +4977,8 @@ def values(self): See Also -------- - pandas.DataFrame.index : Retrieve the index labels - pandas.DataFrame.columns : Retrieving the column names + pandas.DataFrame.index : Retrieve the index labels. + pandas.DataFrame.columns : Retrieving the column names. """ self._consolidate_inplace() return self._data.as_array(transpose=self._AXIS_REVERSED) @@ -5130,7 +5130,7 @@ def dtypes(self): See Also -------- - pandas.DataFrame.ftypes : dtype and sparsity information. + pandas.DataFrame.ftypes : Dtype and sparsity information. Examples -------- @@ -5891,8 +5891,8 @@ def bfill(self, axis=None, inplace=False, limit=None, downcast=None): See Also -------- - %(klass)s.fillna : Fill NA values - %(klass)s.where : Replace values based on boolean condition + %(klass)s.fillna : Fill NA values. + %(klass)s.where : Replace values based on boolean condition. Series.str.replace : Simple string replacement. Returns @@ -6691,10 +6691,10 @@ def asof(self, where, subset=None): See Also -------- - %(klass)s.isnull : alias of isna - %(klass)s.notna : boolean inverse of isna - %(klass)s.dropna : omit axes labels with missing values - isna : top-level isna + %(klass)s.isnull : Alias of isna. + %(klass)s.notna : Boolean inverse of isna. + %(klass)s.dropna : Omit axes labels with missing values. + isna : Top-level isna. Examples -------- @@ -6759,10 +6759,10 @@ def isnull(self): See Also -------- - %(klass)s.notnull : alias of notna - %(klass)s.isna : boolean inverse of notna - %(klass)s.dropna : omit axes labels with missing values - notna : top-level notna + %(klass)s.notnull : Alias of notna. + %(klass)s.isna : Boolean inverse of notna. + %(klass)s.dropna : Omit axes labels with missing values. + notna : Top-level notna. Examples -------- @@ -7012,12 +7012,12 @@ def clip_upper(self, threshold, axis=None, inplace=False): See Also -------- DataFrame.clip : General purpose method to trim DataFrame values to - given threshold(s) + given threshold(s). DataFrame.clip_lower : Trim DataFrame values below given - threshold(s) + threshold(s). Series.clip : General purpose method to trim Series values to given - threshold(s) - Series.clip_lower : Trim Series values below given threshold(s) + threshold(s). + Series.clip_lower : Trim Series values below given threshold(s). Examples -------- @@ -7090,12 +7090,12 @@ def clip_lower(self, threshold, axis=None, inplace=False): See Also -------- DataFrame.clip : General purpose method to trim DataFrame values to - given threshold(s) + given threshold(s). DataFrame.clip_upper : Trim DataFrame values above given - threshold(s) + threshold(s). Series.clip : General purpose method to trim Series values to given - threshold(s) - Series.clip_upper : Trim Series values above given threshold(s) + threshold(s). + Series.clip_upper : Trim Series values above given threshold(s). Examples -------- @@ -7420,11 +7420,11 @@ def at_time(self, time, asof=False): See Also -------- - between_time : Select values between particular times of the day - first : Select initial periods of time series based on a date offset - last : Select final periods of time series based on a date offset + between_time : Select values between particular times of the day. + first : Select initial periods of time series based on a date offset. + last : Select final periods of time series based on a date offset. DatetimeIndex.indexer_at_time : Get just the index locations for - values at particular time of the day + values at particular time of the day. """ try: indexer = self.index.indexer_at_time(time, asof=asof) @@ -7482,11 +7482,11 @@ def between_time(self, start_time, end_time, include_start=True, See Also -------- - at_time : Select values at a particular time of the day - first : Select initial periods of time series based on a date offset - last : Select final periods of time series based on a date offset + at_time : Select values at a particular time of the day. + first : Select initial periods of time series based on a date offset. + last : Select final periods of time series based on a date offset. DatetimeIndex.indexer_between_time : Get just the index locations for - values between particular times of the day + values between particular times of the day. """ try: indexer = self.index.indexer_between_time( @@ -7837,9 +7837,9 @@ def first(self, offset): See Also -------- - last : Select final periods of time series based on a date offset - at_time : Select values at a particular time of the day - between_time : Select values between particular times of the day + last : Select final periods of time series based on a date offset. + at_time : Select values at a particular time of the day. + between_time : Select values between particular times of the day. """ if not isinstance(self.index, DatetimeIndex): raise TypeError("'first' only supports a DatetimeIndex index") @@ -7900,9 +7900,9 @@ def last(self, offset): See Also -------- - first : Select initial periods of time series based on a date offset - at_time : Select values at a particular time of the day - between_time : Select values between particular times of the day + first : Select initial periods of time series based on a date offset. + at_time : Select values at a particular time of the day. + between_time : Select values between particular times of the day. """ if not isinstance(self.index, DatetimeIndex): raise TypeError("'last' only supports a DatetimeIndex index") @@ -8386,7 +8386,7 @@ def _where(self, cond, other=np.nan, inplace=False, axis=None, level=None, See Also -------- :func:`DataFrame.%(name_other)s` : Return an object of same shape as - self + self. Examples -------- @@ -9058,7 +9058,7 @@ def abs(self): See Also -------- - numpy.absolute : calculate the absolute value element-wise. + numpy.absolute : Calculate the absolute value element-wise. """ return np.abs(self) @@ -10088,10 +10088,10 @@ def _doc_parms(cls): """ _all_see_also = """\ -See also +See Also -------- -pandas.Series.all : Return True if all elements are True -pandas.DataFrame.any : Return True if one (or more) elements are True +pandas.Series.all : Return True if all elements are True. +pandas.DataFrame.any : Return True if one (or more) elements are True. """ _cnum_doc = """ @@ -10115,7 +10115,7 @@ def _doc_parms(cls): ------- %(outname)s : %(name1)s or %(name2)s\n %(examples)s -See also +See Also -------- pandas.core.window.Expanding.%(accum_func_name)s : Similar functionality but ignores ``NaN`` values. diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index ea7507799fa9a..0c232ab8df9f5 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -90,7 +90,7 @@ class providing the base-class of operations. -------- {examples} - See also + See Also -------- pipe : Apply function to the full GroupBy object instead of to each group. @@ -215,8 +215,8 @@ class providing the base-class of operations. See Also -------- -pandas.Series.pipe : Apply a function with arguments to a series -pandas.DataFrame.pipe: Apply a function with arguments to a dataframe +pandas.Series.pipe : Apply a function with arguments to a series. +pandas.DataFrame.pipe: Apply a function with arguments to a dataframe. apply : Apply function to each group instead of to the full %(klass)s object. """ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 263de57d32f31..fd78cb37926e1 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -212,10 +212,10 @@ class Index(IndexOpsMixin, PandasObject): See Also --------- - RangeIndex : Index implementing a monotonic integer range + RangeIndex : Index implementing a monotonic integer range. CategoricalIndex : Index of :class:`Categorical` s. - MultiIndex : A multi-level, or hierarchical, Index - IntervalIndex : an Index of :class:`Interval` s. + MultiIndex : A multi-level, or hierarchical, Index. + IntervalIndex : An Index of :class:`Interval` s. DatetimeIndex, TimedeltaIndex, PeriodIndex Int64Index, UInt64Index, Float64Index """ @@ -820,8 +820,8 @@ def repeat(self, repeats, *args, **kwargs): See Also -------- - Series.repeat : Equivalent function for Series - numpy.repeat : Underlying implementation + Series.repeat : Equivalent function for Series. + numpy.repeat : Underlying implementation. Examples -------- @@ -2249,10 +2249,10 @@ def isna(self): See Also -------- - pandas.Index.notna : boolean inverse of isna. - pandas.Index.dropna : omit entries with missing values. - pandas.isna : top-level isna. - Series.isna : detect missing values in Series object. + pandas.Index.notna : Boolean inverse of isna. + pandas.Index.dropna : Omit entries with missing values. + pandas.isna : Top-level isna. + Series.isna : Detect missing values in Series object. Examples -------- @@ -2307,9 +2307,9 @@ def notna(self): See also -------- - Index.notnull : alias of notna - Index.isna: inverse of notna - pandas.notna : top-level notna + Index.notnull : Alias of notna. + Index.isna: Inverse of notna. + pandas.notna : Top-level notna. Examples -------- @@ -2486,7 +2486,7 @@ def asof(self, label): passed index. merge_asof : Perform an asof merge (similar to left join but it matches on nearest key rather than equal key). - Index.get_loc : `asof` is a thin wrapper around `get_loc` + Index.get_loc : An `asof` is a thin wrapper around `get_loc` with method='pad'. Examples @@ -3202,9 +3202,9 @@ def _get_level_values(self, level): values : Index Calling object, as there is only one level in the Index. - See also + See Also -------- - MultiIndex.get_level_values : get values for a level of a MultiIndex + MultiIndex.get_level_values : Get values for a level of a MultiIndex. Notes ----- @@ -4409,7 +4409,7 @@ def slice_locs(self, start=None, end=None, step=None, kind=None): See Also -------- - Index.get_loc : Get location for a single label + Index.get_loc : Get location for a single label. """ inc = (step is None or step >= 0) @@ -4561,9 +4561,9 @@ def drop_duplicates(self, keep='first'): See Also -------- - Series.drop_duplicates : equivalent method on Series - DataFrame.drop_duplicates : equivalent method on DataFrame - Index.duplicated : related method on Index, indicating duplicate + Series.drop_duplicates : Equivalent method on Series. + DataFrame.drop_duplicates : Equivalent method on DataFrame. + Index.duplicated : Related method on Index, indicating duplicate Index values. Examples @@ -4642,9 +4642,9 @@ def duplicated(self, keep='first'): See Also -------- - pandas.Series.duplicated : Equivalent method on pandas.Series - pandas.DataFrame.duplicated : Equivalent method on pandas.DataFrame - pandas.Index.drop_duplicates : Remove duplicate values from Index + pandas.Series.duplicated : Equivalent method on pandas.Series. + pandas.DataFrame.duplicated : Equivalent method on pandas.DataFrame. + pandas.Index.drop_duplicates : Remove duplicate values from Index. """ return super(Index, self).duplicated(keep=keep) diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 1d9d3b1d3bd16..d3067b70a461a 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -58,7 +58,7 @@ def strftime(self, date_format): See Also -------- - pandas.to_datetime : Convert the given argument to datetime + pandas.to_datetime : Convert the given argument to datetime. DatetimeIndex.normalize : Return DatetimeIndex with times to midnight. DatetimeIndex.round : Round the DatetimeIndex to the specified freq. DatetimeIndex.floor : Floor the DatetimeIndex to the specified freq. @@ -434,7 +434,7 @@ def min(self, axis=None, *args, **kwargs): Return the minimum value of the Index or minimum along an axis. - See also + See Also -------- numpy.ndarray.min """ @@ -463,7 +463,7 @@ def argmin(self, axis=None, *args, **kwargs): See `numpy.ndarray.argmin` for more information on the `axis` parameter. - See also + See Also -------- numpy.ndarray.argmin """ @@ -484,7 +484,7 @@ def max(self, axis=None, *args, **kwargs): Return the maximum value of the Index or maximum along an axis. - See also + See Also -------- numpy.ndarray.max """ @@ -513,7 +513,7 @@ def argmax(self, axis=None, *args, **kwargs): See `numpy.ndarray.argmax` for more information on the `axis` parameter. - See also + See Also -------- numpy.ndarray.argmax """ diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index b754b2705d034..80a6947e82ff8 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -164,10 +164,10 @@ class DatetimeIndex(DatetimeArray, DatelikeOps, TimelikeOps, See Also --------- - Index : The base pandas Index type - TimedeltaIndex : Index of timedelta64 data - PeriodIndex : Index of Period data - pandas.to_datetime : Convert argument to datetime + Index : The base pandas Index type. + TimedeltaIndex : Index of timedelta64 data. + PeriodIndex : Index of Period data. + pandas.to_datetime : Convert argument to datetime. """ _typ = 'datetimeindex' diff --git a/pandas/core/indexes/frozen.py b/pandas/core/indexes/frozen.py index 3ac4a2bf31a7e..cb145dd9eed4d 100644 --- a/pandas/core/indexes/frozen.py +++ b/pandas/core/indexes/frozen.py @@ -164,7 +164,7 @@ def searchsorted(self, value, side="left", sorter=None): See Also -------- - numpy.searchsorted : equivalent function + numpy.searchsorted : Equivalent function. """ # We are much more performant if the searched diff --git a/pandas/core/indexes/interval.py b/pandas/core/indexes/interval.py index eb4284203d865..2b157bf91c5a2 100644 --- a/pandas/core/indexes/interval.py +++ b/pandas/core/indexes/interval.py @@ -1185,7 +1185,7 @@ def interval_range(start=None, end=None, periods=None, freq=None, See Also -------- - IntervalIndex : an Index of intervals that are all closed on the same side. + IntervalIndex : An Index of intervals that are all closed on the same side. """ start = com.maybe_box_datetimelike(start) end = com.maybe_box_datetimelike(end) diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index 01304cce507f0..d610b5e406995 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -171,11 +171,11 @@ class MultiIndex(Index): See Also -------- - MultiIndex.from_arrays : Convert list of arrays to MultiIndex + MultiIndex.from_arrays : Convert list of arrays to MultiIndex. MultiIndex.from_product : Create a MultiIndex from the cartesian product - of iterables - MultiIndex.from_tuples : Convert list of tuples to a MultiIndex - Index : The base pandas Index type + of iterables. + MultiIndex.from_tuples : Convert list of tuples to a MultiIndex. + Index : The base pandas Index type. Attributes ---------- @@ -1296,9 +1296,9 @@ def from_arrays(cls, arrays, sortorder=None, names=None): See Also -------- - MultiIndex.from_tuples : Convert list of tuples to MultiIndex + MultiIndex.from_tuples : Convert list of tuples to MultiIndex. MultiIndex.from_product : Make a MultiIndex from cartesian product - of iterables + of iterables. """ if not is_list_like(arrays): raise TypeError("Input must be a list / sequence of array-likes.") @@ -1402,8 +1402,8 @@ def from_product(cls, iterables, sortorder=None, names=None): See Also -------- - MultiIndex.from_arrays : Convert list of arrays to MultiIndex - MultiIndex.from_tuples : Convert list of tuples to MultiIndex + MultiIndex.from_arrays : Convert list of arrays to MultiIndex. + MultiIndex.from_tuples : Convert list of tuples to MultiIndex. """ from pandas.core.arrays.categorical import _factorize_from_iterables from pandas.core.reshape.util import cartesian_product @@ -1804,9 +1804,9 @@ def swaplevel(self, i=-2, j=-1): See Also -------- - Series.swaplevel : Swap levels i and j in a MultiIndex + Series.swaplevel : Swap levels i and j in a MultiIndex. Dataframe.swaplevel : Swap levels i and j in a MultiIndex on a - particular axis + particular axis. Examples -------- @@ -2206,7 +2206,7 @@ def get_loc(self, key, method=None): See also -------- - Index.get_loc : get_loc method for (single-level) index. + Index.get_loc : The get_loc method for (single-level) index. MultiIndex.slice_locs : Get slice location given start label(s) and end label(s). MultiIndex.get_locs : Get location for a label/slice/list/mask or a @@ -2310,7 +2310,7 @@ def get_loc_level(self, key, level=0, drop_level=True): --------- MultiIndex.get_loc : Get location for a label or a tuple of labels. MultiIndex.get_locs : Get location for a label/slice/list/mask or a - sequence of such + sequence of such. """ def maybe_droplevels(indexer, levels, drop_level): diff --git a/pandas/core/indexes/numeric.py b/pandas/core/indexes/numeric.py index 795ffeefa1794..52f0246659198 100644 --- a/pandas/core/indexes/numeric.py +++ b/pandas/core/indexes/numeric.py @@ -157,7 +157,7 @@ def insert(self, loc, item): See also -------- - Index : The base pandas Index type + Index : The base pandas Index type. """ _int64_descr_args = dict( diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index 7890f03a1eba7..f35e775fc0a28 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -165,10 +165,10 @@ class PeriodIndex(DatelikeOps, DatetimeIndexOpsMixin, See Also --------- - Index : The base pandas Index type - Period : Represents a period of time - DatetimeIndex : Index with datetime64 data - TimedeltaIndex : Index of timedelta64 data + Index : The base pandas Index type. + Period : Represents a period of time. + DatetimeIndex : Index with datetime64 data. + TimedeltaIndex : Index of timedelta64 data. """ _typ = 'periodindex' _attributes = ['name', 'freq'] diff --git a/pandas/core/indexes/range.py b/pandas/core/indexes/range.py index e4c177a08462e..1d88fdc85f7f0 100644 --- a/pandas/core/indexes/range.py +++ b/pandas/core/indexes/range.py @@ -49,8 +49,8 @@ class RangeIndex(Int64Index): See Also -------- - Index : The base pandas Index type - Int64Index : Index of int64 data + Index : The base pandas Index type. + Int64Index : Index of int64 data. Attributes ---------- diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py index d9625d38b85de..9f9d8b1b67171 100644 --- a/pandas/core/indexes/timedeltas.py +++ b/pandas/core/indexes/timedeltas.py @@ -72,10 +72,10 @@ class TimedeltaIndex(TimedeltaArray, DatetimeIndexOpsMixin, See Also --------- - Index : The base pandas Index type + Index : The base pandas Index type. Timedelta : Represents a duration between two dates or times. - DatetimeIndex : Index of datetime64 data - PeriodIndex : Index of Period data + DatetimeIndex : Index of datetime64 data. + PeriodIndex : Index of Period data. Attributes ---------- diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index 0c6aaf4b46d6a..d376c95a7e1b3 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -1569,11 +1569,11 @@ class _LocIndexer(_LocationIndexer): See Also -------- - DataFrame.at : Access a single value for a row/column label pair - DataFrame.iloc : Access group of rows and columns by integer position(s) + DataFrame.at : Access a single value for a row/column label pair. + DataFrame.iloc : Access group of rows and columns by integer position(s). DataFrame.xs : Returns a cross-section (row(s) or column(s)) from the Series/DataFrame. - Series.loc : Access group of values using labels + Series.loc : Access group of values using labels. Examples -------- @@ -2302,9 +2302,9 @@ class _AtIndexer(_ScalarAccessIndexer): See Also -------- DataFrame.iat : Access a single value for a row/column pair by integer - position - DataFrame.loc : Access a group of rows and columns by label(s) - Series.at : Access a single value using a label + position. + DataFrame.loc : Access a group of rows and columns by label(s). + Series.at : Access a single value using a label. Examples -------- @@ -2372,9 +2372,9 @@ class _iAtIndexer(_ScalarAccessIndexer): See Also -------- - DataFrame.at : Access a single value for a row/column label pair - DataFrame.loc : Access a group of rows and columns by label(s) - DataFrame.iloc : Access a group of rows and columns by integer position(s) + DataFrame.at : Access a single value for a row/column label pair. + DataFrame.loc : Access a group of rows and columns by label(s). + DataFrame.iloc : Access a group of rows and columns by integer position(s). Examples -------- diff --git a/pandas/core/series.py b/pandas/core/series.py index 20e4720a3bde7..f018759cb22e3 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1456,8 +1456,8 @@ def unique(self): See Also -------- - pandas.unique : top-level unique method for any 1-d array-like object. - Index.unique : return Index with unique values from an Index object. + pandas.unique : Top-level unique method for any 1-d array-like object. + Index.unique : Return Index with unique values from an Index object. Examples -------- @@ -1516,9 +1516,9 @@ def drop_duplicates(self, keep='first', inplace=False): See Also -------- - Index.drop_duplicates : equivalent method on Index - DataFrame.drop_duplicates : equivalent method on DataFrame - Series.duplicated : related method on Series, indicating duplicate + Index.drop_duplicates : Equivalent method on Index. + DataFrame.drop_duplicates : Equivalent method on DataFrame. + Series.duplicated : Related method on Series, indicating duplicate Series values. Examples @@ -1638,9 +1638,9 @@ def duplicated(self, keep='first'): See Also -------- - pandas.Index.duplicated : Equivalent method on pandas.Index - pandas.DataFrame.duplicated : Equivalent method on pandas.DataFrame - pandas.Series.drop_duplicates : Remove duplicate values from Series + pandas.Index.duplicated : Equivalent method on pandas.Index. + pandas.DataFrame.duplicated : Equivalent method on pandas.DataFrame. + pandas.Series.drop_duplicates : Remove duplicate values from Series. """ return super(Series, self).duplicated(keep=keep) @@ -1976,7 +1976,7 @@ def diff(self, periods=1): Series.pct_change: Percent change over given number of periods. Series.shift: Shift index by desired number of periods with an optional time freq. - DataFrame.diff: First discrete difference of object + DataFrame.diff: First discrete difference of object. Examples -------- @@ -2184,7 +2184,7 @@ def append(self, to_append, ignore_index=False, verify_integrity=False): See also -------- pandas.concat : General function to concatenate DataFrame, Series - or Panel objects + or Panel objects. Returns ------- @@ -2316,7 +2316,7 @@ def combine(self, other, func, fill_value=None): See Also -------- Series.combine_first : Combine Series values, choosing the calling - Series's values first + Series's values first. """ if fill_value is None: fill_value = na_value_for_dtype(self.dtype, compat=False) @@ -2381,7 +2381,7 @@ def combine_first(self, other): See Also -------- Series.combine : Perform elementwise operation on two Series - using a given function + using a given function. """ new_index = self.index.union(other.index) this = self.reindex(new_index, copy=False) @@ -2649,9 +2649,9 @@ def sort_index(self, axis=0, level=None, ascending=True, inplace=False, See Also -------- - DataFrame.sort_index: Sort DataFrame by the index - DataFrame.sort_values: Sort DataFrame by the value - Series.sort_values : Sort Series by the value + DataFrame.sort_index: Sort DataFrame by the index. + DataFrame.sort_values: Sort DataFrame by the value. + Series.sort_values : Sort Series by the value. Examples -------- @@ -3265,9 +3265,9 @@ def apply(self, func, convert_dtype=True, args=(), **kwds): See also -------- - Series.map: For element-wise operations - Series.agg: only perform aggregating type operations - Series.transform: only perform transforming type operations + Series.map: For element-wise operations. + Series.agg: Only perform aggregating type operations. + Series.transform: Only perform transforming type operations. Examples -------- @@ -3742,7 +3742,7 @@ def isin(self, values): See Also -------- - pandas.DataFrame.isin : equivalent method on DataFrame + pandas.DataFrame.isin : Equivalent method on DataFrame. Examples -------- @@ -3800,8 +3800,8 @@ def between(self, left, right, inclusive=True): See Also -------- - pandas.Series.gt : Greater than of series and other - pandas.Series.lt : Less than of series and other + pandas.Series.gt : Greater than of series and other. + pandas.Series.lt : Less than of series and other. Examples -------- diff --git a/pandas/core/strings.py b/pandas/core/strings.py index a12605aaed554..99aab607b2bf0 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -205,7 +205,7 @@ def str_contains(arr, pat, case=True, flags=0, na=np.nan, regex=True): See Also -------- - match : analogous, but stricter, relying on re.match instead of re.search + match : Analogous, but stricter, relying on re.match instead of re.search. Series.str.startswith : Test if the start of each string element matches a pattern. Series.str.endswith : Same as startswith, but tests the end of string. @@ -667,9 +667,9 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan): See Also -------- - contains : analogous, but less strict, relying on re.search instead of - re.match - extract : extract matched groups + contains : Analogous, but less strict, relying on re.search instead of + re.match. + extract : Extract matched groups. """ if not case: @@ -803,7 +803,7 @@ def str_extract(arr, pat, flags=0, expand=True): See Also -------- - extractall : returns all matches (not just the first match) + extractall : Returns all matches (not just the first match). Examples -------- @@ -890,7 +890,7 @@ def str_extractall(arr, pat, flags=0): See Also -------- - extract : returns first match only (not all matches) + extract : Returns first match only (not all matches). Examples -------- @@ -2104,8 +2104,8 @@ def cat(self, others=None, sep=None, na_rep=None, join=None): See Also -------- - split : Split each string in the Series/Index - join : Join lists contained as elements in the Series/Index + split : Split each string in the Series/Index. + join : Join lists contained as elements in the Series/Index. Examples -------- @@ -2676,9 +2676,9 @@ def encode(self, encoding, errors="strict"): See Also -------- - Series.str.strip : Remove leading and trailing characters in Series/Index - Series.str.lstrip : Remove leading characters in Series/Index - Series.str.rstrip : Remove trailing characters in Series/Index + Series.str.strip : Remove leading and trailing characters in Series/Index. + Series.str.lstrip : Remove leading characters in Series/Index. + Series.str.rstrip : Remove trailing characters in Series/Index. Examples -------- diff --git a/pandas/core/window.py b/pandas/core/window.py index be28a3bcccec6..5a83f417962f4 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -416,10 +416,10 @@ def aggregate(self, arg, *args, **kwargs): See Also -------- - Series.%(name)s : Calling object with Series data - DataFrame.%(name)s : Calling object with DataFrames - Series.mean : Equivalent method for Series - DataFrame.mean : Equivalent method for DataFrame + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + Series.mean : Equivalent method for Series. + DataFrame.mean : Equivalent method for DataFrame. Examples -------- @@ -592,7 +592,7 @@ class Window(_Window): See Also -------- expanding : Provides expanding transformations. - ewm : Provides exponential weighted functions + ewm : Provides exponential weighted functions. """ def validate(self): @@ -903,9 +903,9 @@ class _Rolling_and_Expanding(_Rolling): See Also -------- - pandas.Series.%(name)s : Calling object with Series data - pandas.DataFrame.%(name)s : Calling object with DataFrames - pandas.DataFrame.count : Count of the full DataFrame + pandas.Series.%(name)s : Calling object with Series data. + pandas.DataFrame.%(name)s : Calling object with DataFrames. + pandas.DataFrame.count : Count of the full DataFrame. Examples -------- @@ -1031,10 +1031,10 @@ def max(self, *args, **kwargs): See Also -------- - Series.%(name)s : Calling object with a Series - DataFrame.%(name)s : Calling object with a DataFrame - Series.min : Similar method for Series - DataFrame.min : Similar method for DataFrame + Series.%(name)s : Calling object with a Series. + DataFrame.%(name)s : Calling object with a DataFrame. + Series.min : Similar method for Series. + DataFrame.min : Similar method for DataFrame. Examples -------- @@ -1074,10 +1074,10 @@ def mean(self, *args, **kwargs): See Also -------- - Series.%(name)s : Calling object with Series data - DataFrame.%(name)s : Calling object with DataFrames - Series.median : Equivalent method for Series - DataFrame.median : Equivalent method for DataFrame + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + Series.median : Equivalent method for Series. + DataFrame.median : Equivalent method for DataFrame. Examples -------- @@ -1117,11 +1117,11 @@ def median(self, **kwargs): See Also -------- - Series.%(name)s : Calling object with Series data - DataFrame.%(name)s : Calling object with DataFrames - Series.std : Equivalent method for Series - DataFrame.std : Equivalent method for DataFrame - numpy.std : Equivalent method for Numpy array + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + Series.std : Equivalent method for Series. + DataFrame.std : Equivalent method for DataFrame. + numpy.std : Equivalent method for Numpy array. Notes ----- @@ -1188,11 +1188,11 @@ def f(arg, *args, **kwargs): See Also -------- - Series.%(name)s : Calling object with Series data - DataFrame.%(name)s : Calling object with DataFrames - Series.var : Equivalent method for Series - DataFrame.var : Equivalent method for DataFrame - numpy.var : Equivalent method for Numpy array + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + Series.var : Equivalent method for Series. + DataFrame.var : Equivalent method for DataFrame. + numpy.var : Equivalent method for Numpy array. Notes ----- @@ -1255,12 +1255,12 @@ def skew(self, **kwargs): See Also -------- - Series.%(name)s : Calling object with Series data - DataFrame.%(name)s : Calling object with DataFrames - Series.kurt : Equivalent method for Series - DataFrame.kurt : Equivalent method for DataFrame - scipy.stats.skew : Third moment of a probability density - scipy.stats.kurtosis : Reference SciPy method + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + Series.kurt : Equivalent method for Series. + DataFrame.kurt : Equivalent method for DataFrame. + scipy.stats.skew : Third moment of a probability density. + scipy.stats.kurtosis : Reference SciPy method. Notes ----- @@ -1414,12 +1414,12 @@ def _get_cov(X, Y): See Also -------- - Series.%(name)s : Calling object with Series data - DataFrame.%(name)s : Calling object with DataFrames - Series.corr : Equivalent method for Series - DataFrame.corr : Equivalent method for DataFrame - %(name)s.cov : Similar method to calculate covariance - numpy.corrcoef : NumPy Pearson's correlation calculation + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + Series.corr : Equivalent method for Series. + DataFrame.corr : Equivalent method for DataFrame. + %(name)s.cov : Similar method to calculate covariance. + numpy.corrcoef : NumPy Pearson's correlation calculation. Notes ----- @@ -1849,8 +1849,8 @@ class Expanding(_Rolling_and_Expanding): See Also -------- - rolling : Provides rolling window calculations - ewm : Provides exponential weighted functions + rolling : Provides rolling window calculations. + ewm : Provides exponential weighted functions. """ _attributes = ['min_periods', 'center', 'axis'] @@ -2168,7 +2168,7 @@ class EWM(_Rolling): See Also -------- - rolling : Provides rolling window calculations + rolling : Provides rolling window calculations. expanding : Provides expanding transformations. """ _attributes = ['com', 'min_periods', 'adjust', 'ignore_na', 'axis'] diff --git a/pandas/io/json/table_schema.py b/pandas/io/json/table_schema.py index 3b4ebb638412e..2c2ecf75bbe7b 100644 --- a/pandas/io/json/table_schema.py +++ b/pandas/io/json/table_schema.py @@ -290,9 +290,9 @@ def parse_table_schema(json, precise_float): :class:`Index` name of 'index' and :class:`MultiIndex` names starting with 'level_' are not supported. - See also + See Also -------- - build_table_schema : inverse function + build_table_schema : Inverse function. pandas.read_json """ table = loads(json, precise_float=precise_float) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 4c28e0f88b1ae..8c574bcb70363 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -326,8 +326,8 @@ def read_hdf(path_or_buf, key=None, mode='r', **kwargs): See Also -------- - pandas.DataFrame.to_hdf : write a HDF file from a DataFrame - pandas.HDFStore : low-level access to HDF files + pandas.DataFrame.to_hdf : Write a HDF file from a DataFrame. + pandas.HDFStore : Low-level access to HDF files. Examples -------- diff --git a/pandas/io/sql.py b/pandas/io/sql.py index 2f411a956dfb8..ccde8075c75a3 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -1065,7 +1065,7 @@ def read_query(self, sql, index_col=None, coerce_float=True, See also -------- - read_sql_table : Read SQL database table into a DataFrame + read_sql_table : Read SQL database table into a DataFrame. read_sql """ diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 66e996075f1ed..ac78bfbcc624b 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -98,8 +98,8 @@ See Also -------- -pandas.io.stata.StataReader : low-level reader for Stata data files -pandas.DataFrame.to_stata: export Stata data files +pandas.io.stata.StataReader : Low-level reader for Stata data files. +pandas.DataFrame.to_stata: Export Stata data files. Examples -------- diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 405c534e8528b..9affe50b5f94e 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -3491,7 +3491,7 @@ def scatter(self, x, y, s=None, c=None, **kwds): See Also -------- - matplotlib.pyplot.scatter : scatter plot using multiple input data + matplotlib.pyplot.scatter : Scatter plot using multiple input data formats. Examples @@ -3567,7 +3567,7 @@ def hexbin(self, x, y, C=None, reduce_C_function=None, gridsize=None, See Also -------- DataFrame.plot : Make plots of a DataFrame. - matplotlib.pyplot.hexbin : hexagonal binning plot using matplotlib, + matplotlib.pyplot.hexbin : Hexagonal binning plot using matplotlib, the matplotlib function that is used under the hood. Examples diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index f889e08b5d348..39765b27cf19c 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -185,7 +185,7 @@ def radviz(frame, class_column, ax=None, color=None, colormap=None, **kwds): See Also -------- - pandas.plotting.andrews_curves : Plot clustering visualization + pandas.plotting.andrews_curves : Plot clustering visualization. Examples -------- diff --git a/pandas/util/_validators.py b/pandas/util/_validators.py index e51e0c88e5b95..1171478de2eb4 100644 --- a/pandas/util/_validators.py +++ b/pandas/util/_validators.py @@ -196,8 +196,8 @@ def validate_args_and_kwargs(fname, args, kwargs, See Also -------- - validate_args : purely args validation - validate_kwargs : purely kwargs validation + validate_args : Purely args validation. + validate_kwargs : Purely kwargs validation. """ # Check that the total number of arguments passed in (i.e. From 78a654de52b2d7e8ff673072c216f3fcaea1d1ab Mon Sep 17 00:00:00 2001 From: Pek Date: Sun, 11 Nov 2018 09:10:28 -0500 Subject: [PATCH 2/3] convert tabs to whitespace, reduce long line length. --- pandas/core/frame.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 10601bb5b45c6..d0597eecc0f40 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -351,7 +351,7 @@ class DataFrame(NDFrame): DataFrame.from_records : Constructor from tuples, also record arrays. DataFrame.from_dict : From dicts of Series, arrays, or dicts. DataFrame.from_items : From sequence of (key, value) pairs - pandas.read_csv, pandas.read_table, pandas.read_clipboard. + pandas.read_csv, pandas.read_table, pandas.read_clipboard. """ @property @@ -1920,7 +1920,8 @@ def to_stata(self, fname, convert_dates=None, write_index=True, -------- pandas.read_stata : Import Stata data files. pandas.io.stata.StataWriter : Low-level writer for Stata data files. - pandas.io.stata.StataWriter117 : Low-level writer for version 117 files. + pandas.io.stata.StataWriter117 : Low-level writer for version 117 + files. Examples -------- From 68050f7d10dc571c7b9f31646261dbce89acacff Mon Sep 17 00:00:00 2001 From: Pek Date: Sun, 11 Nov 2018 11:05:07 -0500 Subject: [PATCH 3/3] refs #23654 Remove trailing whitespace. --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index d0597eecc0f40..d793ffe3d3441 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1920,7 +1920,7 @@ def to_stata(self, fname, convert_dates=None, write_index=True, -------- pandas.read_stata : Import Stata data files. pandas.io.stata.StataWriter : Low-level writer for Stata data files. - pandas.io.stata.StataWriter117 : Low-level writer for version 117 + pandas.io.stata.StataWriter117 : Low-level writer for version 117 files. Examples