# Data Explorer

Explore dataframes and data files in a spreadsheet-like grid with filtering, sorting, and summary statistics. View CSV, Parquet, and in-memory data interactively.

The Data Explorer is designed to complement code-first exploration of data, allowing you to display data in a spreadsheet-like grid, temporarily filter and sort data, and provide useful summary statistics directly inside of Positron. The goal of the Data Explorer isn’t to replace code-based workflows, but rather supplement with ephemeral views of the data or summary statistics as you further explore or modify the data via code.

The Data Explorer can be used to view raw data files (CSV, Parquet, etc.) in your Positron workspace as well as dataframes in your active Python or R sessions.

The Data Explorer has three primary components:

- **[Data grid](data-explorer-data-grid.llms.md):** Spreadsheet-like display of the individual cells and columns
- **[Summary panel](data-explorer-summary-panel.llms.md):** Summary statistics for each column in the dataset
- **[Filter bar](data-explorer-filter-bar.llms.md):** Ephemeral filters for specific columns

[![Data explorer displaying filtered flight data. Left column shows column distribution and summary statistics. Main section lists data in a table sorted by month in ascending order. Top section shows filters such as dep_time is not missing, month \> 1.](images/data-explorer.png)](images/data-explorer.png "Data Explorer")

Data Explorer

## Opening the Data Explorer

There are a few ways to open the Data Explorer. If you want to look at data you have loaded into memory already, you can navigate to the [**Variables** pane](variables-pane.llms.md) and select the icon for a specific dataframe object.

Using code or the console, you can also run one of the following commands:

- In Python: `%view dataframe label`
- In R: `View(dataframe, "label")`

In Python, the `%view` magic can also be used with expressions, for example `%view df[df['column'] > 10]`. In R, the `View` function can be composed with expressions using pipe syntax:

``` r
df |> mutate(doubled_column = column * 2) |> View()
```

Directly opening `.csv`, `.tsv`, and `.parquet` files (using DuckDB) is supported by selecting a file in the File Explorer or using the Command Palette.[^1] GZIP-compressed CSV files ending in `.gz` can also be opened. We may add support for more file types in the future.

### Opening CSV files as plain text

After opening a CSV file in the Data Explorer, if you need to view the file in the text editor, select the **Open as Plain Text File** option in the top action bar.

## Footnotes

[^1]: Use the **File Options** button in the action bar to configure how a `.csv` or `.tsv` file is parsed by DuckDB.
