I have data having over 385 features, to find uniques for a column i have used df.unique() function.
However I have to find unique values over all 385 columns.
I tried using for loop as under,
col = [df_train.columns]
for i in col:
print(i.unique())
I'm getting an output as under
Index(['ID', 'y', 'X0', 'X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X8',
...
'X375', 'X376', 'X377', 'X378', 'X379', 'X380', 'X382', 'X383', 'X384',
'X385'],
dtype='object', length=366)
However the above are the columns names of the dataset and not the unique values of each columns.
I'm doing a concept error when I'm applying for loop, it would be appreciated to correct me where I'm going wrong or an alternative method to do the same.
Thanks in advance.