title: Extract useful information from pandas df to dictionary
body: <p>I have multiple data coming for samples and each dataframe look like below.
  I wish to convert extraction of each dataframe to a dictionary.</p>
  <pre><code>lake = pd.DataFrame({'t': ['t0', 't1', 't2', 't3'],
                   'area': [10, 20, 10, 15],
                   'freq': [100, 88, 130, 140],
                   'sensor1_avg': [2, 5, 2, 8],
                   'sensor2_avg': [3, 3, 2, 3],
                   'sensor3_avg': [7, 5, 2, 3],
                   'sensor4_avg': [7, 5, 2, 3]})
  
  def process_df_todict(df):
      max_area = max(df.area)
      min_area = min(df.area)
      max_freq = max(df.freq)
      min_freq = min(df.freq)
      max_delta_sensor_avg = max(max(df.sensor1_avg)-min(df.sensor1_avg), max(df.sensor2_avg)-min(df.sensor2_avg), max(df.sensor3_avg)-min(df.sensor3_avg), max(df.sensor4_avg)-min(df.sensor4_avg))
      min_delta_sensor_avg = min(max(df.sensor1_avg)-min(df.sensor1_avg), max(df.sensor2_avg)-min(df.sensor2_avg), max(df.sensor3_avg)-min(df.sensor3_avg), max(df.sensor4_avg)-min(df.sensor4_avg))
      final_dict = {max_area : eval(max_area), min_area  : eval(min_area), ....}
      return final_dict
  
  process_df_to_dict(lake)
  </code></pre>
  <blockquote>
  <p>output: {'max_area': 20, 'min_area': 10, 'max_freq': 140, 'min_freq':
  88, 'max_delta_sensor_avg':6, 'min_delta_sensor_avg':1}</p>
  </blockquote>
  <p>Is there any better way to extract data out of dataframe to a dict than what is shown..?</p>