AttributeError: ‘float’ object has no attribute ’round’
Just change this: a = 3.56803 print(a.round(2)) to this: a = 3.56803 print(round(a, 2))
Just change this: a = 3.56803 print(a.round(2)) to this: a = 3.56803 print(round(a, 2))
Use double square brackets around ‘Number’, i.e.: df.groupby([‘Name’, ‘Fruit’])[[‘Number’]].agg(‘sum’)