How to apply proc_df on test data?


(Naveed Unjum) #1

Has anyone tried making predictions on the actual test data? I am having some problems with proc_df function. After applying apply_cats on the data, proc_df produces the AttributeError: Can only use .cat accessor with a 'category' dtype error. Please help


(Maciej Kedziora) #2

I got this problem for dates when i didnt use:
add_datepart(train,‘Date’)

If you have any type of date its worth trying.


(Naveed Unjum) #3

I found what i was doing wrong. I was applying apply_cats after making all the other changes to df_raw. Make sure you make a copy of df_raw after applying train_cats