I am grouping my dataset by column A and then would like to take the minimum value in column B and the corresponding value in column C.
data = pd.DataFrame({\'A\
Had a similar situation but with a more complex column heading (e.g. "B val") in which case this is needed:
df.loc[df.groupby('A')['B val'].idxmin()]