Skip to content

Commit c699917

Browse files
koaningmscolnick
andauthored
docs: dataframe docs (#6812)
I figured I'd add some extra context on the dataframe settings when I noticed that the dataframe docs were broken 🫨 ! https://github.com/user-attachments/assets/ed1c3b2d-20ad-427f-847b-15cc25406cc8 This PR fixes the issue, we were missing some closing `///` that would hide whole portions of the docs as a result. It also mentions a user setting that is relevant to this portion of the docs. --------- Co-authored-by: Myles Scolnick <[email protected]>
1 parent a35648c commit c699917

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed
106 KB
Loading

docs/guides/working_with_data/dataframes.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ dataframe_.
320320
</figure>
321321
</div>
322322

323+
323324
/// tab | pandas
324325

325326
```python
@@ -339,6 +340,7 @@ table.value
339340

340341
///
341342

343+
342344
/// tab | polars
343345

344346
```python
@@ -382,7 +384,10 @@ def __():
382384

383385
///
384386

385-
## Dataframe panels
387+
///
388+
389+
390+
## Dataframe panels {#dataframe-panels}
386391

387392
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
388393

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

394399
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.
395400

396-
### Row viewer panel
401+
### Row viewer panel {#row-viewer-panel}
397402

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

411-
### Column explorer panel
416+
### Column explorer panel {#column-explorer-panel}
412417

413418
<div align="center">
414419
<figure>
@@ -427,12 +432,30 @@ import altair
427432
altair.data_transformers.enable("vegafusion")
428433
```
429434

430-
### Chart builder
435+
### Chart builder {#chart-builder}
431436

432437
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.
433438

439+
## Preferences {#preferences}
440+
441+
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.
442+
443+
444+
<div align="center">
445+
<figure>
446+
<img src="/_static/docs-dataframe-default-setting.png"/>
447+
<figcaption>Configure the default SQL output</figcaption>
448+
</figure>
449+
</div>
450+
451+
Alternatively you can also use the [marimo configuration file](/guides/configuration/#user-configuration) to configure the default SQL output.
452+
453+
```toml
454+
[runtime]
455+
default_sql_output = "native"
456+
```
434457

435-
## Example notebook
458+
## Example notebook {#example-notebook}
436459

437460
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).
438461

0 commit comments

Comments
 (0)