Skip to content

Commit d50c0aa

Browse files
DaanVanHauwermeirenpandres
authored andcommitted
DOC: update the pandas.Index.drop_duplicates and pandas.Series.drop_duplicates docstring (pandas-dev#20114)
1 parent 802848c commit d50c0aa

File tree

5 files changed

+5263
-22
lines changed

5 files changed

+5263
-22
lines changed

pandas/core/base.py

-18
Original file line numberDiff line numberDiff line change
@@ -1184,24 +1184,6 @@ def searchsorted(self, value, side='left', sorter=None):
11841184
# needs coercion on the key (DatetimeIndex does already)
11851185
return self.values.searchsorted(value, side=side, sorter=sorter)
11861186

1187-
_shared_docs['drop_duplicates'] = (
1188-
"""Return %(klass)s with duplicate values removed
1189-
1190-
Parameters
1191-
----------
1192-
1193-
keep : {'first', 'last', False}, default 'first'
1194-
- ``first`` : Drop duplicates except for the first occurrence.
1195-
- ``last`` : Drop duplicates except for the last occurrence.
1196-
- False : Drop all duplicates.
1197-
%(inplace)s
1198-
1199-
Returns
1200-
-------
1201-
deduplicated : %(klass)s
1202-
""")
1203-
1204-
@Appender(_shared_docs['drop_duplicates'] % _indexops_doc_kwargs)
12051187
def drop_duplicates(self, keep='first', inplace=False):
12061188
inplace = validate_bool_kwarg(inplace, 'inplace')
12071189
if isinstance(self, ABCIndexClass):

pandas/core/groupby.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,8 @@ def describe(self, **kwargs):
14751475
@Substitution(name='groupby')
14761476
@Appender(_doc_template)
14771477
def resample(self, rule, *args, **kwargs):
1478-
"""Provide resampling when using a TimeGrouper.
1478+
"""
1479+
Provide resampling when using a TimeGrouper.
14791480
14801481
Given a grouper the function resamples it according to a string and an
14811482
optional list and dictionary of parameters. Returns a new grouper with
@@ -1501,7 +1502,6 @@ def resample(self, rule, *args, **kwargs):
15011502
15021503
Examples
15031504
--------
1504-
15051505
Start by creating a DataFrame with 9 one minute timestamps.
15061506
15071507
>>> idx = pd.date_range('1/1/2000', periods=9, freq='T')

0 commit comments

Comments
 (0)