File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -168,23 +168,22 @@ def all(self, args):
168168
169169 df2 .to_csv (f"{ args .userCWD } /{ args .user } _all_data.csv" , index = False )
170170
171- groupby_dict = {
171+ common_groupby = {
172172 'UserX' : 'first' ,
173173 'carbonFootprint' : 'sum' ,
174174 'carbonFootprint_failedJobs' : 'sum' ,
175175 'cost_failedJobs' : 'sum' ,
176176 'Cost (Pounds)' : 'sum' ,
177- 'Efficientcy (TotalCPU / CPUtime hours)' : 'mean' ,}
177+ 'Efficientcy (TotalCPU / CPUtime hours)' : 'mean'
178+ }
179+
180+ groupby_dict = common_groupby .copy ()
178181
179182 groupby_dict2 = {
180- 'UserX' : 'first' ,
181- 'AllocTRES' : 'first' ,
182- 'PartitionX' : 'first' ,
183- 'carbonFootprint' : 'sum' ,
184- 'carbonFootprint_failedJobs' : 'sum' ,
185- 'cost_failedJobs' : 'sum' ,
186- 'Cost (Pounds)' : 'sum' ,
187- 'Efficientcy (TotalCPU / CPUtime hours)' : 'mean' }
183+ ** common_groupby ,
184+ 'AllocTRES' : 'first' ,
185+ 'PartitionX' : 'first'
186+ }
188187
189188 result_submitdate = df2 .groupby ('SubmitDate' ).agg (groupby_dict ).reset_index ()
190189 # print("result_submitdate", result_submitdate)
You can’t perform that action at this time.
0 commit comments