code: def meter_data_to_csv(meter_data, path_or_buf):
      
      if meter_data.index.name is None:
          meter_data.index.name = "start"
      return meter_data.to_csv(path_or_buf, index=True)
docs: Write meter data to CSV. See also :any:`pandas.DataFrame.to_csv`.
  
      Parameters
      ----------
      meter_data : :any:`pandas.DataFrame`
          Meter data DataFrame with ``'value'`` column and
          :any:`pandas.DatetimeIndex`.
      path_or_buf : :any:`str` or file handle, default None
          File path or object, if None is provided the result is returned as a string.