Skip to content

Commit

Permalink
Merge pull request fastai#202 from noklam/master
Browse files Browse the repository at this point in the history
Change elapsed function to avoid converting nan to int, convert column
  • Loading branch information
jph00 authored Mar 10, 2018
2 parents ca88790 + 1059e8b commit 4c2f4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions courses/dl1/lesson3-rossman.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,7 @@
" last_date = np.datetime64()\n",
" last_store = s\n",
" if v: last_date = d\n",
" res.append(((d-last_date).astype('timedelta64[D]') / day1).astype(int))\n",
" res.append(((d-last_date).astype('timedelta64[D]') / day1))\n",
" df[pre+fld] = res"
]
},
Expand Down Expand Up @@ -3124,7 +3124,7 @@
"for o in ['Before', 'After']:\n",
" for p in columns:\n",
" a = o+p\n",
" df[a] = df[a].fillna(0)"
" df[a] = df[a].fillna(0).astype(int)"
]
},
{
Expand Down

0 comments on commit 4c2f4de

Please sign in to comment.