Adding 1 in numericalize: lesson1


(nishant hegde) #1

in lesson 1 @jeremy talks about adding 1 to the cat codes
df[name] = col.cat.codes+1

anyone know why this is needed and what the downside of having a -1 is? how would this affect splitting?