Skip to content

Commit f186af0

Browse files
committed
Removed last example
1 parent 88ff298 commit f186af0

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

pandas/core/tools/timedeltas.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,6 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
7474
>>> pd.to_timedelta(np.arange(5), box=False)
7575
array([0, 1, 2, 3, 4], dtype='timedelta64[ns]')
7676
77-
Add new column of dates from existing dates in a `DataFrame`
78-
using `timedelta`:
79-
80-
>>> Dates = pd.to_datetime(['26/10/2018','28/10/2018', '2/11/2018'])
81-
>>> df = pd.DataFrame({'Start': Dates,'Days':[5, 10, 5]})
82-
>>> df['End'] = df['Start'] + pd.to_timedelta(df['Days'], unit='d')
83-
>>> df
84-
Start Days End
85-
0 2018-10-26 5 2018-10-31
86-
1 2018-10-28 10 2018-11-07
87-
2 2018-02-11 5 2018-02-16
88-
8977
See also
9078
--------
9179
pandas.DataFrame.astype : Cast argument to a specified dtype.

0 commit comments

Comments
 (0)