code: def create_table(
      table_text,
      colorscale=None,
      font_colors=None,
      index=False,
      index_title="",
      annotation_offset=0.45,
      height_constant=30,
      hoverinfo="none",
      **kwargs,
  ):
      """
      Function that creates data tables.
  
      See also the plotly.graph_objects trace
      :class:`plotly.graph_objects.Table`
  
      :param (pandas.Dataframe | list[list]) text: data for table.
      :param (str|list[list]) colorscale: Colorscale for table where the
          color at value 0 is the header color, .5 is the first table color
          and 1 is the second table color. (Set .5 and 1 to avoid the striped
          table effect). Default=[[0, '#66b2ff'], [.5, '#d9d9d9'],
          [1, '#ffffff']]
      :param (list) font_colors: Color for fonts in table. Can be a single
          color, three colors, or a color for each row in the table.
          Default=['#000000'] (black text for the entire table)
      :param (int) height_constant: Constant multiplied by # of rows to
          create table height. Default=30.
      :param (bool) index: Create (header-colored) index column index from
          Pandas dataframe or list[0] for each list in text. Default=False.
      :param (string) index_title: Title for index column. Default=''.
      :param kwargs: kwargs passed through plotly.graph_objs.Heatmap.
          These kwargs describe other attributes about the annotated Heatmap
          trace such as the colorscale. For more information on valid kwargs
          call help(plotly.graph_objs.Heatmap)
  
      Example 1: Simple Plotly Table
  
      >>> from plotly.figure_factory import create_table
  
      >>> text = [['Country', 'Year', 'Population'],
      ...         ['US', 2000, 282200000],
      ...         ['Canada', 2000, 27790000],
      ...         ['US', 2010, 309000000],
      ...         ['Canada', 2010, 34000000]]
  
      >>> table = create_table(text)
      >>> table.show()
  
      Example 2: Table with Custom Coloring
  
      >>> from plotly.figure_factory import create_table
      >>> text = [['Country', 'Year', 'Population'],
      ...         ['US', 2000, 282200000],
      ...         ['Canada', 2000, 27790000],
      ...         ['US', 2010, 309000000],
      ...         ['Canada', 2010, 34000000]]
      >>> table = create_table(text,
      ...                      colorscale=[[0, '#000000'],
      ...                                  [.5, '#80beff'],
      ...                                  [1, '#cce5ff']],
      ...                      font_colors=['#ffffff', '#000000',
      ...                                 '#000000'])
      >>> table.show()
  
      Example 3: Simple Plotly Table with Pandas
  
      >>> from plotly.figure_factory import create_table
      >>> import pandas as pd
      >>> df = pd.read_csv('http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt', sep='\t')
      >>> df_p = df[0:25]
      >>> table_simple = create_table(df_p)
      >>> table_simple.show()
  
      """
  
      # Avoiding mutables in the call signature
      colorscale = (
          colorscale
          if colorscale is not None
          else [[0, "#00083e"], [0.5, "#ededee"], [1, "#ffffff"]]
      )
      font_colors = (
          font_colors
          if font_colors is not None
          else ["#ffffff", "#000000", "#000000"]
      )
  
      validate_table(table_text, font_colors)
      table_matrix = _Table(
          table_text,
          colorscale,
          font_colors,
          index,
          index_title,
          annotation_offset,
          **kwargs,
      ).get_table_matrix()
      annotations = _Table(
          table_text,
          colorscale,
          font_colors,
          index,
          index_title,
          annotation_offset,
          **kwargs,
      ).make_table_annotations()
  
      trace = dict(
          type="heatmap",
          z=table_matrix,
          opacity=0.75,
          colorscale=colorscale,
          showscale=False,
          hoverinfo=hoverinfo,
          **kwargs,
      )
  
      data = [trace]
      layout = dict(
          annotations=annotations,
          height=len(table_matrix) * height_constant + 50,
          margin=dict(t=0, b=0, r=0, l=0),
          yaxis=dict(
              autorange="reversed",
              zeroline=False,
              gridwidth=2,
              ticks="",
              dtick=1,
              tick0=0.5,
              showticklabels=False,
          ),
          xaxis=dict(
              zeroline=False,
              gridwidth=2,
              ticks="",
              dtick=1,
              tick0=-0.5,
              showticklabels=False,
          ),
      )
      return graph_objs.Figure(data=data, layout=layout)
  
file_path: catboost/contrib/python/plotly/py3/plotly/figure_factory/_table.py
imports: from plotly import exceptions, optional_imports
  from plotly.graph_objs import graph_objs
label_desc: Use image node_id 2 for calling a global function with example usage: create_table(table_text, colorscale, font_colors, index, index_title, annotation_offset, height_constant, hoverinfo) and returns: graph_objs