class_docstr: Base class for generator of stats proto from generic data.
class_docstr_tok: ["Base","class","for","generator","of","stats","proto","from","generic","data","."]
docstr: Creates a feature statistics proto from a set of pandas dataframes.
  
  Args:
    dataframes: A list of dicts describing tables for each dataset for the
        proto. Each entry contains a 'table' field of the dataframe of the
          data
        and a 'name' field to identify the dataset in the proto.
    histogram_categorical_levels_count: int, controls the maximum number of
        levels to display in histograms for categorical features.
        Useful to prevent codes/IDs features from bloating the stats object.
        Defaults to None.
  Returns:
    The feature statistics proto for the provided tables.
docstr_tok: ["Creates","a","feature","statistics","proto","from","a","set","of","pandas","dataframes",".","Args",":","dataframes",":","A","list","of","dicts","describing","tables","for","each","dataset","for","the","proto",".","Each","entry","contains","a","'table","'","field","of","the","dataframe","of","the","data","and","a","'name","'","field","to","identify","the","dataset","in","the","proto",".","histogram_categorical_levels_count",":","int",",","controls","the","maximum","number","of","levels","to","display","in","histograms","for","categorical","features",".","Useful","to","prevent","codes\/IDs","features","from","bloating","the","stats","object",".","Defaults","to","None",".","Returns",":","The","feature","statistics","proto","for","the","provided","tables","."]
code: def ProtoFromDataFrames(
      self, dataframes, histogram_categorical_levels_count=None
  ):
      """Creates a feature statistics proto from a set of pandas dataframes.
  
      Args:
        dataframes: A list of dicts describing tables for each dataset for the
            proto. Each entry contains a 'table' field of the dataframe of the
              data
            and a 'name' field to identify the dataset in the proto.
        histogram_categorical_levels_count: int, controls the maximum number of
            levels to display in histograms for categorical features.
            Useful to prevent codes/IDs features from bloating the stats object.
            Defaults to None.
      Returns:
        The feature statistics proto for the provided tables.
      """
      datasets = []
      for dataframe in dataframes:
          table = dataframe["table"]
          table_entries = {}
          for col in table:
              table_entries[col] = self.NdarrayToEntry(table[col])
          datasets.append(
              {
                  "entries": table_entries,
                  "size": len(table),
                  "name": dataframe["name"],
              }
          )
      return self.GetDatasetsProto(
          datasets,
          histogram_categorical_levels_count=histogram_categorical_levels_count,
      )
  
file_path: facets/facets_overview/facets_overview/base_generic_feature_statistics_generator.py
imports: import numpy
  import pandas
  import sys
label_desc: Use image node_id 2 for calling the BaseGenericFeatureStatisticsGenerator obj's underlying member method code with example usage: obj.ProtoFromDataFrames(dataframes, histogram_categorical_levels_count) and returns: self