Spaces:
Sleeping
Sleeping
Fix some texts
Browse files
polars/05_reactive_plots.py
CHANGED
|
@@ -54,8 +54,7 @@ def _(pl):
|
|
| 54 |
def _(mo):
|
| 55 |
mo.md(
|
| 56 |
"""
|
| 57 |
-
|
| 58 |
-
You should always take a look at the data you are working on before actually doing any operations on it - for data coming from sources such as HuggingFace or Kaggle can preview it via their websites, and optionally filter or do some transformations before downloading.
|
| 59 |
|
| 60 |
The [Polars Lazy API](https://docs.pola.rs/user-guide/lazy/) allows for you define operations before loading the data, and polars will optimize the plan in order to avoid doing unnecessary operations or loading data we do not care about.
|
| 61 |
|
|
@@ -90,7 +89,6 @@ def _(lz, pl):
|
|
| 90 |
def _(mo):
|
| 91 |
mo.md(
|
| 92 |
r"""
|
| 93 |
-
|
| 94 |
When you start exploring a dataset, some of the first things to do may include:
|
| 95 |
|
| 96 |
- investigating any values that seem weird
|
|
@@ -150,7 +148,7 @@ def _(mo):
|
|
| 150 |
|
| 151 |
@app.cell
|
| 152 |
def _(pl, plot):
|
| 153 |
-
# The format of
|
| 154 |
pl.DataFrame(plot.value)
|
| 155 |
return
|
| 156 |
|
|
@@ -307,7 +305,7 @@ def _(
|
|
| 307 |
opacity=alpha.value,
|
| 308 |
trendline="lowess" if include_trendline.value else None,
|
| 309 |
render_mode="webgl",
|
| 310 |
-
# strings on
|
| 311 |
# hover_name="track_name",
|
| 312 |
# hover_data=("artists", "album_name"),
|
| 313 |
)
|
|
@@ -352,8 +350,8 @@ def _(mo):
|
|
| 352 |
Reviewing what we have covered in this Notebook:
|
| 353 |
|
| 354 |
- Understand the data you're working with first and foremost
|
| 355 |
-
- Creating plots can help you
|
| 356 |
-
- Thanks to marimo interactive UI elements we can explore multiple facets of the data without changing the code
|
| 357 |
"""
|
| 358 |
)
|
| 359 |
return
|
|
|
|
| 54 |
def _(mo):
|
| 55 |
mo.md(
|
| 56 |
"""
|
| 57 |
+
You should always take a look at the data you are working on before actually doing any operations on it - for data coming from sources such as HuggingFace or Kaggle you can preview it via their websites, and optionally filter or do some transformations before downloading.
|
|
|
|
| 58 |
|
| 59 |
The [Polars Lazy API](https://docs.pola.rs/user-guide/lazy/) allows for you define operations before loading the data, and polars will optimize the plan in order to avoid doing unnecessary operations or loading data we do not care about.
|
| 60 |
|
|
|
|
| 89 |
def _(mo):
|
| 90 |
mo.md(
|
| 91 |
r"""
|
|
|
|
| 92 |
When you start exploring a dataset, some of the first things to do may include:
|
| 93 |
|
| 94 |
- investigating any values that seem weird
|
|
|
|
| 148 |
|
| 149 |
@app.cell
|
| 150 |
def _(pl, plot):
|
| 151 |
+
# The format of plot.value may vary depending on which kind of plot you are working with, let's see what we have for this case:
|
| 152 |
pl.DataFrame(plot.value)
|
| 153 |
return
|
| 154 |
|
|
|
|
| 305 |
opacity=alpha.value,
|
| 306 |
trendline="lowess" if include_trendline.value else None,
|
| 307 |
render_mode="webgl",
|
| 308 |
+
# strings on hover get fairly heavy when there are too many rows, but you can try using it after applying a few filters
|
| 309 |
# hover_name="track_name",
|
| 310 |
# hover_data=("artists", "album_name"),
|
| 311 |
)
|
|
|
|
| 350 |
Reviewing what we have covered in this Notebook:
|
| 351 |
|
| 352 |
- Understand the data you're working with first and foremost
|
| 353 |
+
- Creating plots can help you find and explain patterns, identify outliers and observe trends
|
| 354 |
+
- Thanks to marimo's interactive UI elements, we can explore multiple facets of the data without changing the code
|
| 355 |
"""
|
| 356 |
)
|
| 357 |
return
|