Skip to content

Commit

Permalink
Change deprecated pd.datetools.timedelta to datetime.timedelta
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevdp committed Nov 30, 2018
1 parent be23269 commit 8a34a4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion notebooks/04.14-Visualization-With-Seaborn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1122,9 +1122,11 @@
}
],
"source": [
"import datetime\n",
"\n",
"def convert_time(s):\n",
" h, m, s = map(int, s.split(':'))\n",

This comment has been minimized.

Copy link
@sukhpreetsinghlohiya
" return pd.datetools.timedelta(hours=h, minutes=m, seconds=s)\n",
" return datetime.timedelta(hours=h, minutes=m, seconds=s)\n",
"\n",
"data = pd.read_csv('marathon-data.csv',\n",
" converters={'split':convert_time, 'final':convert_time})\n",
Expand Down

3 comments on commit 8a34a4f

@sojiritesh2003
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanx

@patricia2454
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@kmishra2005
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

Please sign in to comment.