Skip to content

Commit

Permalink
fix datetime type conversion in rossmann_data_clean nb (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfwiggins authored and jph00 committed Mar 27, 2019
1 parent 6b79676 commit 6344cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbs/dl1/rossman_data_clean.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
"from isoweek import Week\n",
"for df in (joined,joined_test):\n",
" df[\"Promo2Since\"] = pd.to_datetime(df.apply(lambda x: Week(\n",
" x.Promo2SinceYear, x.Promo2SinceWeek).monday(), axis=1).astype(pd.datetime))\n",
" x.Promo2SinceYear, x.Promo2SinceWeek).monday(), axis=1))\n",
" df[\"Promo2Days\"] = df.Date.subtract(df[\"Promo2Since\"]).dt.days"
]
},
Expand Down

0 comments on commit 6344cb8

Please sign in to comment.