I have the following DataFrame:
High counts Total
11 1.2492 2 2.4984
1 1.2466 2 2.4932
20 1.2574 1 1.2574
19 1.2547 1 1.2547
18 1.2523 1 1.2523
I have used following line to groupby
hg = grps.groupby("High").size().reset_index(name='counts')
I am trying to group by this DataFrame in the following format. But values of High must not change.
{:.3f} # 1.249, 1.246, 1.257 ...
Is it possible to do this or shall i create a new DataFrame?
EDIT:
Here is the expected output
High counts Total New
11 1.2492 2 2.4984 1.249
1 1.2466 2 2.4932 1.246
20 1.2574 1 1.2574 1.257
19 1.2547 1 1.2547 1.254
18 1.2523 1 1.2523 1.252