Getting an key error while practicing machine learning
November 18, 2022 ⚊ 1 Min read ⚊ Views 88 ⚊ EDUCATIONI was getting a similar kind of error in one of my codes. Turns out, that particular index was missing from my data frame as I had dropped the empty dataframe 2 rows. If this is the case, you can do df.reset_index(inplace=True) and the error should be resolved.
Tags: it, Learn, machine