Reputation: 85
I have a large dataset, have a column with usernames and other column for their status.
username status
John TRUE
John TRUE
John FALSE
Mike FALSE
... ...
I want to see if a user's status changes and who that user is. I don't know where to start, how can I achieve this?
Upvotes: 0
Views: 34
Reputation: 8768
Try this:
df.groupby('username')['status'].nunique().loc[lambda x: x.gt(1)].index
Upvotes: 1