Proc_df KeyError: '[4 2 3 ... 3 5 5] not in index'

Hey guys, running into an issue with proc_df that I can’t seem to diagnose after searching the forum and stack overflow. My dataset is structured columnar data.

my target to predict is a category 1 through 5 and I know there are some unknowns which i replaced with 0’s.

I have run traincats on the dataset prior to these screenshots:

my dtypes prior to running proc_df are:

where my target is currently set as int8 but I have also tried it as a categorical.

I’m running it on a structured dataset and getting a KeyError:

Just for background, I’m a new programmer <2 months experience so it’s possible I’ve overlooked something simple and dumb. Any help would be greatly appreciated.

My guess it should be like this:

X, y, nas = proc_df(combined, 'target')
1 Like

Just to close the loop, that worked for me. I swear I had tried it that way originally but I guess not. Thanks for the help