Skip to content

Commit d11fae6

Browse files
topper-123jreback
authored andcommitted
Add 'See also' sections (#17223)
1 parent 2362414 commit d11fae6

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

pandas/core/generic.py

+3
Original file line numberDiff line numberDiff line change
@@ -3681,6 +3681,9 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):
36813681
36823682
See also
36833683
--------
3684+
pandas.to_datetime : Convert argument to datetime.
3685+
pandas.to_timedelta : Convert argument to timedelta.
3686+
pandas.to_numeric : Convert argument to a numeric type.
36843687
numpy.ndarray.astype : Cast a numpy array to a specified type.
36853688
"""
36863689
if is_dict_like(dtype):

pandas/core/tools/datetimes.py

+4
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
335335
1 1960-01-03
336336
2 1960-01-04
337337
338+
See also
339+
--------
340+
pandas.DataFrame.astype : Cast argument to a specified dtype.
341+
pandas.to_timedelta : Convert argument to timedelta.
338342
"""
339343
from pandas.core.indexes.datetimes import DatetimeIndex
340344

pandas/core/tools/numeric.py

+7
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ def to_numeric(arg, errors='raise', downcast=None):
8484
2 2.0
8585
3 -3.0
8686
dtype: float64
87+
88+
See also
89+
--------
90+
pandas.DataFrame.astype : Cast argument to a specified dtype.
91+
pandas.to_datetime : Convert argument to datetime.
92+
pandas.to_timedelta : Convert argument to timedelta.
93+
numpy.ndarray.astype : Cast a numpy array to a specified type.
8794
"""
8895
if downcast not in (None, 'integer', 'signed', 'unsigned', 'float'):
8996
raise ValueError('invalid downcasting method provided')

pandas/core/tools/timedeltas.py

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
6161
>>> pd.to_timedelta(np.arange(5), unit='d')
6262
TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'],
6363
dtype='timedelta64[ns]', freq=None)
64+
65+
See also
66+
--------
67+
pandas.DataFrame.astype : Cast argument to a specified dtype.
68+
pandas.to_datetime : Convert argument to datetime.
6469
"""
6570
unit = _validate_timedelta_unit(unit)
6671

0 commit comments

Comments
 (0)