Args: df: The pandas dataframe to attach to the report caption: A caption to display below the plot (optional) name: A unique name for the block to reference when adding text or embedding (optional) label: A label used when displaying the bloc
(
self,
df: pd.DataFrame,
caption: t.Optional[str] = None,
name: BlockId = None,
label: str = None,
)
| 194 | _tag = "DataTable" |
| 195 | |
| 196 | def __init__( |
| 197 | self, |
| 198 | df: pd.DataFrame, |
| 199 | caption: t.Optional[str] = None, |
| 200 | name: BlockId = None, |
| 201 | label: str = None, |
| 202 | ): |
| 203 | """ |
| 204 | Args: |
| 205 | df: The pandas dataframe to attach to the report |
| 206 | caption: A caption to display below the plot (optional) |
| 207 | name: A unique name for the block to reference when adding text or embedding (optional) |
| 208 | label: A label used when displaying the block (optional) |
| 209 | """ |
| 210 | # create a copy of the df to process |
| 211 | df = to_df(df) |
| 212 | super().__init__(data=df, caption=caption, name=name, label=label) |
| 213 | # TODO - support pyarrow schema for local reports |
| 214 | (rows, columns) = df.shape |
| 215 | self.file_attribs = mk_attribs(rows=rows, columns=columns, schema="[]") |
nothing calls this directly
no test coverage detected