我正在尝试按一两列进行分组,将第四列的值相加并在第五列中找到平均值。每个操作都要写在单独的输出中。甚至开始时感觉有点棘手。
输入:无标题,行数超过100k
StartTime, EndTime,Day,SumCount,UniqueCount
00:00:00,01:00:00,Mon,13534,594
01:00:00,02:00:00,Mon,16674,626
02:00:00,03:00:00,Mon,23736,671
03:00:00,04:00:00,Mon,16977,671
00:00:00,01:00:00,Tue,17262,747
01:00:00,02:00:00,Tue,19072,777
02:00:00,03:00:00,Tue,18275,785
03:00:00,04:00:00,Tue,13589,757
04:00:00,05:00:00,Tue,16053,735
05:00:00,06:00:00,Tue,11440,636
我想找到的是
StartTime
& EndTime
找到SumCount
的总和和UniqueCount
Day
找到SumCount
的总和和UniqueCount
的中位数我迷失了如何将两种类型的groupby放在一个程序中并获得两个不同的输出。