Skip to content

Commit 84aed68

Browse files
committed
Removed last example
1 parent f10dbd3 commit 84aed68

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
@@ -76,18 +76,6 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
7676
>>> pd.to_timedelta(np.arange(5), box=False)
7777
array([0, 1, 2, 3, 4], dtype='timedelta64[ns]')
7878
79-
Add new column of dates from existing dates in a `DataFrame`
80-
using `timedelta`:
81-
82-
>>> Dates = pd.to_datetime(['26/10/2018','28/10/2018', '2/11/2018'])
83-
>>> df = pd.DataFrame({'Start': Dates,'Days':[5, 10, 5]})
84-
>>> df['End'] = df['Start'] + pd.to_timedelta(df['Days'], unit='d')
85-
>>> df
86-
Start Days End
87-
0 2018-10-26 5 2018-10-31
88-
1 2018-10-28 10 2018-11-07
89-
2 2018-02-11 5 2018-02-16
90-
9179
See also
9280
--------
9381
pandas.DataFrame.astype : Cast argument to a specified dtype.

0 commit comments

Comments
 (0)