File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -168,17 +168,27 @@ 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 = {
172+ 'UserX' : 'first' ,
172173 'carbonFootprint' : 'sum' ,
173174 'carbonFootprint_failedJobs' : 'sum' ,
174- 'cost' : 'sum' ,
175- 'cost_memoryNeededOnly' : 'sum' ,
176175 'cost_failedJobs' : 'sum' ,
177176 'Cost (Pounds)' : 'sum' ,
178- 'UserX' : 'first' }
177+ 'Efficientcy (TotalCPU / CPUtime hours)' : 'mean'
178+ }
179+
180+ groupby_dict = common_groupby .copy ()
181+
182+ groupby_dict2 = {
183+ ** common_groupby ,
184+ 'AllocTRES' : 'first' ,
185+ 'PartitionX' : 'first'
186+ }
179187
180188 result_submitdate = df2 .groupby ('SubmitDate' ).agg (groupby_dict ).reset_index ()
189+ # print("result_submitdate", result_submitdate)
181190 result_submitdate .to_csv (f"{ args .userCWD } /{ args .user } _submitdate_data.csv" , index = False )
182191
183- result_jobname = df2 .groupby ('JobName' ).agg (groupby_dict ).reset_index ()
192+ result_jobname = df2 .groupby ('JobName' ).agg (groupby_dict2 ).reset_index ()
193+ # print("result_jobname", result_jobname)
184194 result_jobname .to_csv (f"{ args .userCWD } /{ args .user } _jobname_data.csv" , index = False )
You can’t perform that action at this time.
0 commit comments