Chart cell

Next to code cells, text cells and SQL cells, DataLab also allows you to insert dedicated chart cells into your notebook. Chart cells are a way to create charts from data frames without writing any code. They are great for quick exploration, but also for building publication-grade visuals to include in your reports.

Creating a chart cell (Python)

Follow these steps to create a chart cell in your workbook:

  • Ensure you have at least one pandas DataFrame in your Python session that is assigned to a variable. You can do this by importing a CSV, running a SQL cell or writing pandas code.

  • Click on "Add Content" at the bottom of the notebook or in between two cells. Then, select "Chart".

  • Select the DataFrame you want to visualize in the dropdown menu at the top left of the newly created cell.

    • Don't see your DataFrame here? You might not have an active session, or the DataFrame may not exist anymore. Try re-running your previous cells to make sure the DataFrame exists in your session!

  • Select the category and series that you want to display on your chart. Learn more about categories, series, and customizing your chart.

Creating a chart cell (R)

To create a chart cell in an R session, follow the same steps as above. Instead of a pandas DataFrame, the source data for your chart must be an R data frame or the result of a SQL cell.

Last updated

Was this helpful?