All the blocks you can use to develop and layout your reports
Reports are comprised of multiple Blocks, which wrap up Python objects, such as Pandas DataFrames, Visualisations, and Markdown. Datapane also includes layout blocks to add tabs, pages, and interactive selects to your reports.
We are always adding new components, and if you have some ideas on what you would like to use in your reports, please start a discussion on GitHub.
In this section we describe the Block types and provide examples. More detailed API usage can be found in our API docs.
If you pass your Python object into your without wrapping it in a specific block component, Datapane will try and automatically choose the best block type.
Datapane has three standard report, which dictate sizing and layout:
Medium: medium width and margins, optimized for mixed content
Narrow: small width and large margins, optimized for long-form text
Full: full-width with no margins, optimized for grid layout and visualizations
The default type is Medium, and you can choose other widths when you create your report as follows:
Except for Page blocks, every block can be nested inside a layout block, meaning you can build arbitrarily complex reports. In addition, most blocks take optional name and caption parameters and display those to your viewers.
Default Block Handling
As well as explicitly specifying your block type (for instance, by using dp.Plot), Datapane will try and choose the best block for your object if you pass it in directly, for instance as follows: