| 69 | # --- LOADING DATA --- |
| 70 | @workflow.atom() |
| 71 | def load_data(): |
| 72 | text("## 2. Viewing Data with `table()`") |
| 73 | text("Let's load a sample dataset and display it using the `table()` component.") |
| 74 | |
| 75 | df = get_df("sample_csv") |
| 76 | table(df, limit=10) # Display first 10 rows |
| 77 | |
| 78 | text( |
| 79 | """ |
| 80 | The `table()` component displays data in a tabular format. |
| 81 | **Example:** |
| 82 | ```python |
| 83 | from preswald import table |
| 84 | table(df, limit=10) |
| 85 | ``` |
| 86 | - **limit**: Use this parameter to control how many rows to display. |
| 87 | """ |
| 88 | ) |
| 89 | return df |
| 90 | |
| 91 | |
| 92 | # --- PLOTTING DATA --- |