Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 28 additions & 5 deletions docs/guides/working_with_data/dataframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ dataframe_.
</figure>
</div>


/// tab | pandas

```python
Expand All @@ -339,6 +340,7 @@ table.value

///


/// tab | polars

```python
Expand Down Expand Up @@ -382,7 +384,10 @@ def __():

///

## Dataframe panels
///


## Dataframe panels {#dataframe-panels}

Dataframe outputs in marimo come with several panels to help you visualize, explore, and page through your data interactively. These panels are accessible via toggles at the bottom-left of a dataframe output. If you need further control, after opening a panel you can

Expand All @@ -393,7 +398,7 @@ Dataframe outputs in marimo come with several panels to help you visualize, expl

Toggles are visible when editing notebooks (with `marimo edit ...`) but not when running notebooks as apps (with `marimo run ...`), except for the row viewer which is available in both.

### Row viewer panel
### Row viewer panel {#row-viewer-panel}

<div align="center">
<figure>
Expand All @@ -408,7 +413,7 @@ To inspect individual rows, open the **row viewer**. This presents a vertical vi
- **Use arrow keys** (`←` `→`) to navigate between rows
- **Click** on any row in the dataframe to view its data in the panel

### Column explorer panel
### Column explorer panel {#column-explorer-panel}

<div align="center">
<figure>
Expand All @@ -427,12 +432,30 @@ import altair
altair.data_transformers.enable("vegafusion")
```

### Chart builder
### Chart builder {#chart-builder}

The chart builder toggle lets you rapidly develop charts using a GUI, while also generating Python code to insert in your notebook. Refer to the [chart builder guide](plotting.md#chart-builder) for more details.

## Preferences {#preferences}

When you run a SQL cell in marimo, you can get the output returned as a dataframe. If you have a preference for a specific dataframe library as a default you can configure the "default SQL output" in the user settings by going to the "Runtime" tab.


<div align="center">
<figure>
<img src="/_static/docs-dataframe-default-setting.png"/>
<figcaption>Configure the default SQL output</figcaption>
</figure>
</div>

Alternatively you can also use the [marimo configuration file](/guides/configuration/#user-configuration) to configure the default SQL output.

```toml
[runtime]
default_sql_output = "native"
```

## Example notebook
## Example notebook {#example-notebook}

For a comprehensive example of using Polars with marimo, check out our [Polars example notebook](https://github.com/marimo-team/marimo/blob/main/examples/third_party/polars/polars_example.py).

Expand Down