should i remove nan values before using labels labelencoder in python code example Example: python remove nan rows df = df[df['my_var'].notna()]