# 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](https://datalab-docs.datacamp.com/work/sql-cell "mention") 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.&#x20;
  * 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](https://datalab-docs.datacamp.com/work/chart-cell/configuring-your-chart) about categories, series, and customizing your chart.

<figure><img src="https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2F5EZAQSAly4BsEbrrLP5a%2FScreenshot%202025-01-29%20at%2010.16.37.png?alt=media&#x26;token=9ab2eb1f-e21d-4939-b7a8-d0ed961a3ff9" alt=""><figcaption></figcaption></figure>

### 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](https://datalab-docs.datacamp.com/work/sql-cell).
