How can I assign the last row of a group (assuming I have sorted it the DF already) a value I want?
# data
df = pd.DataFrame([['a', 1], ['a', 2], ['b', 1], ['b', 2]],
columns=['colA', 'colB'])
# create a new col
df['colC'] = 'Not Current'
# my attempt -- groupby col of interest, get last row, apply value to 'colC' column
df.loc[df.reset_index().groupby('colA').tail(1), 'colC'] = 'Current'