Links

Chart cell

Next to code cells, text cells and SQL cells, Workspace 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.

Python

Follow these steps to create a chart cell (and check out this example workspace):
  • Open a notebook file in DataCamp's notebook editor.
  • 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 "Add Chart" at the bottom of the notebook (or on "Add chart" when hovering on the area in between two cells).
  • Select the data frame you want to visualize in the typeahead block in the chart cell header.
  • Select the chart type and the variables to map onto the X-axis and Y-axis. You can optionally also select a variable to group by, to display multiple lines/bars for multiple categories.

R

The steps are similar to the steps for Python, but the source data for the chart has to be an R data frame or the result of a SQL cell.