I can’t find the function add_datepart for tabular data in version 1.0 of fastai, am I missing something?
It is not in the library now. You can copy paste it from here : https://github.com/fastai/fastai_docs/blob/master/dev_nb/x_009a_rossman_data_clean.ipynb
thanks a lot!
That link is 404’d, anyone have an up to date link? This is a very helpful function.
In case anyone is using fastai 1.0, but still need
add_datepart and the rest of the helper methods, you can find them all here (with excellent documentation and examples of usage):
add_datepart is located in fastai.tabular in fastai 1.0.
Direct link for those looking: https://github.com/fastai/fastai/blob/master/fastai/tabular/transform.py
I have imported * from fastai.tabular. because fastai.structured was giving me an error. But I am not able use add_datepart.
I got the error saying
add_datepart is not defined
I was facing the same issue. It seems like the add_datepart is not available in fastai v1.0. You can copy in the source code or use the older version (v0.7)
No well, I found a solution. It is in the fastai.tabular library itself.
from fastai.tabular.all import *
This shall work
thank you so much!