should i remove nan values before using lable labelencoder in python code example
Example 1: python remove nan rows
df = df[df['my_var'].notna()]
Example 2: drop column with nan values
fish_frame = fish_frame.dropna(axis = 1, how = 'all')
df = df[df['my_var'].notna()]
fish_frame = fish_frame.dropna(axis = 1, how = 'all')