From 3fc2e68860f8fe7f5ba8073b42bbcf9ff22097c0 Mon Sep 17 00:00:00 2001 From: dcreekp Date: Sat, 17 Nov 2018 08:31:06 +0000 Subject: [PATCH] DOC: Remove pandas. prefix from See Also section in Series #23659 --- pandas/core/algorithms.py | 4 +- pandas/core/arrays/datetimes.py | 4 +- pandas/core/generic.py | 58 ++++++++++++++--------------- pandas/core/indexes/datetimelike.py | 2 +- pandas/core/series.py | 26 ++++++------- pandas/core/strings.py | 2 +- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index df2da26685a16..d13b47f592a2e 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -509,8 +509,8 @@ def _factorize_array(values, na_sentinel=-1, size_hint=None, See Also -------- - pandas.cut : Discretize continuous-valued array. - pandas.unique : Find the unique value in an array. + cut : Discretize continuous-valued array. + unique : Find the unique value in an array. Examples -------- diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 7c08644aba68f..8ddbb177b901a 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -897,8 +897,8 @@ def to_period(self, freq=None): See Also -------- - pandas.PeriodIndex: Immutable ndarray holding ordinal values. - pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object. + PeriodIndex: Immutable ndarray holding ordinal values. + DatetimeIndex.to_pydatetime: Return DatetimeIndex as object. """ from pandas.core.arrays import PeriodArray diff --git a/pandas/core/generic.py b/pandas/core/generic.py index a1d60c493dda0..e6443859da21f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -565,7 +565,7 @@ def set_axis(self, labels, axis=0, inplace=None): See Also -------- - pandas.DataFrame.rename_axis : Alter the name of the index or columns. + DataFrame.rename_axis : Alter the name of the index or columns. Examples -------- @@ -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. + Series.rename : Alter Series index labels or name. + DataFrame.rename : Alter DataFrame index labels or name. + Index.rename : Set new names on index. Examples -------- @@ -2042,8 +2042,8 @@ def _repr_latex_(self): See Also -------- - pandas.read_excel - pandas.ExcelWriter + read_excel + ExcelWriter Examples -------- @@ -2161,7 +2161,7 @@ def to_json(self, path_or_buf=None, orient=None, date_format=None, See Also -------- - pandas.read_json + read_json Examples -------- @@ -2393,7 +2393,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. + read_sql : Read a DataFrame from a table. Notes ----- @@ -4216,7 +4216,7 @@ def filter(self, items=None, like=None, regex=None, axis=None): See Also -------- - pandas.DataFrame.loc + DataFrame.loc Notes ----- @@ -4275,7 +4275,7 @@ def head(self, n=5): See Also -------- - pandas.DataFrame.tail: Returns the last `n` rows. + DataFrame.tail: Returns the last `n` rows. Examples -------- @@ -4334,7 +4334,7 @@ def tail(self, n=5): See Also -------- - pandas.DataFrame.head : The first `n` rows of the caller object. + DataFrame.head : The first `n` rows of the caller object. Examples -------- @@ -4584,9 +4584,9 @@ def sample(self, n=None, frac=None, replace=False, weights=None, See Also -------- - pandas.DataFrame.apply - pandas.DataFrame.applymap - pandas.Series.map + DataFrame.apply + DataFrame.applymap + Series.map """) @Appender(_shared_docs['pipe'] % _shared_doc_kwargs) @@ -4899,7 +4899,7 @@ def as_matrix(self, columns=None): See Also -------- - pandas.DataFrame.values + DataFrame.values """ warnings.warn("Method .as_matrix will be removed in a future version. " "Use .values instead.", FutureWarning, stacklevel=2) @@ -5305,9 +5305,9 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs): See Also -------- - pandas.to_datetime : Convert argument to datetime. - pandas.to_timedelta : Convert argument to timedelta. - pandas.to_numeric : Convert argument to a numeric type. + to_datetime : Convert argument to datetime. + to_timedelta : Convert argument to timedelta. + to_numeric : Convert argument to a numeric type. numpy.ndarray.astype : Cast a numpy array to a specified type. """ if is_dict_like(dtype): @@ -5527,9 +5527,9 @@ def convert_objects(self, convert_dates=True, convert_numeric=False, See Also -------- - pandas.to_datetime : Convert argument to datetime. - pandas.to_timedelta : Convert argument to timedelta. - pandas.to_numeric : Convert argument to numeric type. + to_datetime : Convert argument to datetime. + to_timedelta : Convert argument to timedelta. + to_numeric : Convert argument to numeric type. Returns ------- @@ -5561,9 +5561,9 @@ def infer_objects(self): See Also -------- - pandas.to_datetime : Convert argument to datetime. - pandas.to_timedelta : Convert argument to timedelta. - pandas.to_numeric : Convert argument to numeric type. + to_datetime : Convert argument to datetime. + to_timedelta : Convert argument to timedelta. + to_numeric : Convert argument to numeric type. Returns ------- @@ -9904,8 +9904,8 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None, See Also -------- - pandas.read_csv : Load a CSV file into a DataFrame. - pandas.to_excel : Load an Excel file into a DataFrame. + read_csv : Load a CSV file into a DataFrame. + to_excel : Load an Excel file into a DataFrame. Examples -------- @@ -10101,8 +10101,8 @@ def _doc_parms(cls): _all_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. +Series.all : Return True if all elements are True. +DataFrame.any : Return True if one (or more) elements are True. """ _cnum_doc = """ @@ -10128,7 +10128,7 @@ def _doc_parms(cls): %(examples)s See Also -------- -pandas.core.window.Expanding.%(accum_func_name)s : Similar functionality +core.window.Expanding.%(accum_func_name)s : Similar functionality but ignores ``NaN`` values. %(name2)s.%(accum_func_name)s : Return the %(desc)s over %(name2)s axis. diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 7616bc4ea10ef..5369499c087c3 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. + 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. diff --git a/pandas/core/series.py b/pandas/core/series.py index 8fba3030be9d4..7d5c6c91b9e6d 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1454,7 +1454,7 @@ def unique(self): See Also -------- - pandas.unique : Top-level unique method for any 1-d array-like object. + unique : Top-level unique method for any 1-d array-like object. Index.unique : Return Index with unique values from an Index object. Examples @@ -1636,9 +1636,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. + Index.duplicated : Equivalent method on pandas.Index. + DataFrame.duplicated : Equivalent method on pandas.DataFrame. + Series.drop_duplicates : Remove duplicate values from Series. """ return super(Series, self).duplicated(keep=keep) @@ -1869,7 +1869,7 @@ def quantile(self, q=0.5, interpolation='linear'): See Also -------- - pandas.core.window.Rolling.quantile + core.window.Rolling.quantile numpy.percentile """ @@ -2179,7 +2179,7 @@ def append(self, to_append, ignore_index=False, verify_integrity=False): See Also -------- - pandas.concat : General function to concatenate DataFrame, Series + concat : General function to concatenate DataFrame, Series or Panel objects. Returns @@ -3192,8 +3192,8 @@ def _gotitem(self, key, ndim, subset=None): See Also -------- - pandas.Series.apply : Invoke function on a Series. - pandas.Series.transform : Transform function producing + Series.apply : Invoke function on a Series. + Series.transform : Transform function producing a Series with like indexes. """) @@ -3458,7 +3458,7 @@ def rename(self, index=None, **kwargs): See Also -------- - pandas.Series.rename_axis + Series.rename_axis Examples -------- @@ -3732,7 +3732,7 @@ def isin(self, values): See Also -------- - pandas.DataFrame.isin : Equivalent method on DataFrame. + DataFrame.isin : Equivalent method on DataFrame. Examples -------- @@ -3790,8 +3790,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. + Series.gt : Greater than of series and other. + Series.lt : Less than of series and other. Examples -------- @@ -3883,7 +3883,7 @@ def from_csv(cls, path, sep=',', parse_dates=True, header=None, See Also -------- - pandas.read_csv + read_csv Returns ------- diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 412763e6d81cb..53d46fa46811d 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -999,7 +999,7 @@ def str_get_dummies(arr, sep='|'): See Also -------- - pandas.get_dummies + get_dummies """ arr = arr.fillna('') try: