I want to extract all unique combinations of values of columns Col1
, Col2
and Col3
. Let's say there is the following dataframe df
:
df =
Col1 Col2 Col3
12 AB 13
11 AB 13
12 AB 13
12 AC 14
The answer is:
unique =
Col1 Col2 Col3
12 AB 13
11 AB 13
12 AC 14
I know how to obtain unique values of a particular column, i.e. df.Col1.unique()
, however not sure about unique combinations.