MCPcopy Index your code
hub / github.com/plotly/plotly.py / __init__

Method __init__

plotly/figure_factory/_table.py:172–197  ·  view source on GitHub ↗
(
        self,
        table_text,
        colorscale,
        font_colors,
        index,
        index_title,
        annotation_offset,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

170 """
171
172 def __init__(
173 self,
174 table_text,
175 colorscale,
176 font_colors,
177 index,
178 index_title,
179 annotation_offset,
180 **kwargs,
181 ):
182 if pd and isinstance(table_text, pd.DataFrame):
183 headers = table_text.columns.tolist()
184 table_text_index = table_text.index.tolist()
185 table_text = table_text.values.tolist()
186 table_text.insert(0, headers)
187 if index:
188 table_text_index.insert(0, index_title)
189 for i in range(len(table_text)):
190 table_text[i].insert(0, table_text_index[i])
191 self.table_text = table_text
192 self.colorscale = colorscale
193 self.font_colors = font_colors
194 self.index = index
195 self.annotation_offset = annotation_offset
196 self.x = range(len(table_text[0]))
197 self.y = range(len(table_text))
198
199 def get_table_matrix(self):
200 """

Callers

nothing calls this directly

Calls 2

tolistMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected