Consider
df1 = pd.DataFrame("Name":["Adam","Joseph","James","James","Kevin","Kevin","Kevin","Peter","Peter"])
I want to get the index of the unique values in the dataframe.
When I do df1["Name"].unique()
I get the output as
['Adam','Joseph','James','Kevin','Peter']
But I want to get the location of the first occurrence of each value
[0,1,2,4,7]