I have a pandas dataframe of over 100,000 which is already sorted accordingly, however given this sorted dataframe I'm trying to only extract the rows associated with the first occurrence of a specific column. I give an example below where the dataframe df can be considered the sorted dataframe I already have
d = {'id': [10,32,4,10,11,5,32,10], 'A': ['S', 'F', 'R', 'Z','X','T','S','B]}
df = pd.DataFrame(data=d)
print(df)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…