API Reference
Collection of functions to plot and save a pd.DataFrame
.
plot_dataframe
plot_dataframe(df, *, print_index=True, title=None, tbl_header_visible=True, tbl_header=None, tbl_cells=None, row_fill_color=None, col_width=None, fig_size=None, show_fig=True, plotly_renderer='png', **layout_kwargs)
Plot a pd.Series or pd.DataFrame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df
|
Series | DataFrame
|
Series or dataframe to be plotted. |
required |
print_index
|
bool
|
If |
True
|
title
|
dict | None
|
A dict possibly containing https://plotly.com/python/reference/layout/#layout-title More relevant key/value pairs:
Sets the x position with respect to
Sets the title's horizontal alignment with respect to its x position.
"left" means that the title starts at x, "right" means that the title ends
at x and "center" means that the title's center is at x. "auto" divides
|
None
|
tbl_header_visible
|
bool
|
If |
True
|
tbl_header
|
dict | None
|
A dict possibly containing https://plotly.com/python/reference/table/#table-header https://plotly.com/python/reference/table/#table-cells More relevant key/value pairs:
|
None
|
tbl_cells
|
dict | None
|
A dict possibly containing https://plotly.com/python/reference/table/#table-header https://plotly.com/python/reference/table/#table-cells More relevant key/value pairs:
|
None
|
row_fill_color
|
tuple[str, str] | None
|
Tuple of colors that will be used to alternate row colors. Takes precedence
over |
None
|
col_width
|
float | list[int | float] | None
|
The width of columns expressed as a ratio. Columns fill the available width in proportion of their specified column widths. |
None
|
fig_size
|
tuple[int, int] | None
|
Tuple specifying the |
None
|
show_fig
|
bool
|
If True, plot will be displayed. |
True
|
plotly_renderer
|
str
|
Option to specify how and where to display the figure. See https://plotly.com/python/renderers/ for further information. |
'png'
|
**layout_kwargs
|
Any
|
Plotly accepts a large number of layout-related keyword arguments. A detailed descriptions is available at https://plotly.com/python-api-reference/generated/plotly.graph_objects.Layout.html. |
{}
|
Returns:
Type | Description |
---|---|
Figure
|
Returns a figure object. |
save_dataframe
save_dataframe(fig, filename)
Write plotly
figure to disk.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fig
|
Figure
|
Figure object to save. |
required |
filename
|
Path
|
Filename including path where to save figure. |
required |
Returns:
Type | Description |
---|---|
None
|
|