original_docstring: 
          Serialize a dictionary for dataframe
          :return a dictionary
          
docstring: Serialize a dictionary for dataframe
  :return a dictionary
docstring_tokens: Serialize a dictionary for dataframe : return a dictionary
code: def serialize_dataframe(self) -> Dict[str, Any]:
          """
          Serialize a dictionary for dataframe
          :return a dictionary
          """
          columns: Dict[str, Any] = {'metric_score': self.metric_score, 'metric_category': self.metric_category}
          for statistic_type, statistic in self.statistics.items():
              statistic_columns = {
                  f'{statistic.name}_stat_type': statistic_type.serialize(),
                  f'{statistic.name}_stat_unit': [statistic.unit],
                  f'{statistic.name}_stat_value': [statistic.value],
              }
              columns.update(statistic_columns)
  
          if self.time_series is None:
              time_series_unit_column = [None]
              time_series_timestamp_column = [None]
              time_series_values_column = [None]
          else:
              time_series_unit_column = [self.time_series.unit]  # type: ignore
              time_series_timestamp_column = [[int(timestamp) for timestamp in self.time_series.time_stamps]]  # type: ignore
              time_series_values_column = [self.time_series.values]  # type: ignore
  
          time_series_columns = {
              MetricStatisticsDataFrame.time_series_unit_column: time_series_unit_column,
              MetricStatisticsDataFrame.time_series_timestamp_column: time_series_timestamp_column,
              MetricStatisticsDataFrame.time_series_values_column: time_series_values_column,
          }
          columns.update(time_series_columns)
          return columns
code_tokens: def serialize_dataframe ( self ) -> Dict [ str , Any ] : columns : Dict [ str , Any ] = { 'metric_score' : self . metric_score , 'metric_category' : self . metric_category } for statistic_type , statistic in self . statistics . items ( ) : statistic_columns = { f'{statistic.name}_stat_type' : statistic_type . serialize ( ) , f'{statistic.name}_stat_unit' : [ statistic . unit ] , f'{statistic.name}_stat_value' : [ statistic . value ] , } columns . update ( statistic_columns ) if self . time_series is None : time_series_unit_column = [ None ] time_series_timestamp_column = [ None ] time_series_values_column = [ None ] else : time_series_unit_column = [ self . time_series . unit ] time_series_timestamp_column = [ [ int ( timestamp ) for timestamp in self . time_series . time_stamps ] ] time_series_values_column = [ self . time_series . values ] time_series_columns = { MetricStatisticsDataFrame . time_series_unit_column : time_series_unit_column , MetricStatisticsDataFrame . time_series_timestamp_column : time_series_timestamp_column , MetricStatisticsDataFrame . time_series_values_column : time_series_values_column , } columns . update ( time_series_columns ) return columns
short_docstring: Serialize a dictionary for dataframe
  :return a dictionary
short_docstring_tokens: Serialize a dictionary for dataframe : return a dictionary
comment: """
          Serialize a dictionary for dataframe
          :return a dictionary
          """$SEP$# type: ignore$SEP$# type: ignore$SEP$# type: ignore