I have a df as below:
df
In [257]: df Out[257]: user_id col1 col2 0 1 A 4.00000 1 1 A 22.00000 2 1 A 112.0