Sep-18-2020, 12:38 PM
I used below:
df['value'] = (df[['sub_set']] != df[['sub_set']].shift()).any(axis=1).cumsum()but I dont want to sum. I want to reset row value to 1, and increase continuously until next instance(next two rows are different) occures.