Answers for "loop through dataframe column and return unique value"

0

loop through dataframe column and return unique value

which_columns = ... # specify the columns whose unique values you want here

uniques = {col: df[col].unique() for col in which_columns}
Posted by: Guest on August-22-2020

Code answers related to "loop through dataframe column and return unique value"

Python Answers by Framework

Browse Popular Code Answers by Language