I\'m facing this error for multiple variables even treating missing values. For example:
le = preprocessing.LabelEncoder() categorical = list(df.select_dtypes(in
Or use a cast with split to uniform type of str
unique, counts = numpy.unique(str(a).split(), return_counts=True)