Take this df:
df
df = pd.DataFrame({\'client_id\':[0, 0, 0, 1, 1, 1, 2, 2, 2], \'key\':[\'0_382\',\'0_382\',\'0_356\',\'1_365\',float