def prep_pickle_for_total(df, agg_name='median'):
 def prep(df):
  agg = getattr(df, agg_name)
  df = DataFrame(agg(1))
  cols = list(df.columns)
  cols[0] = 'timing'
  df.columns = cols
  df['name'] = list(df.index)
  return df
 return prep(df)

def prep_pickle_for_total ( df , agg_name = 'median' ) : def prep ( df ) : agg = getattr ( df , agg_name ) df = DataFrame ( agg ( 1 ) ) cols = list ( df . columns ) cols [ 0 ] = 'timing' df . columns = cols df [ 'name' ] = list ( df . index ) return df return prep ( df )
accepts a datafram resulting from invocation with -h -d o .