Skip to content

Commit 90ce367

Browse files
create html page
1 parent 0062b91 commit 90ce367

File tree

4 files changed

+102
-16
lines changed

4 files changed

+102
-16
lines changed

data_science_tools/narwhals_row_ordering.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
# /// script
2+
# requires-python = ">=3.11"
3+
# dependencies = [
4+
# "duckdb==1.3.0",
5+
# "marimo",
6+
# "narwhals==1.40.0",
7+
# "pandas==2.2.3",
8+
# "polars==1.30.0",
9+
# "pyarrow==20.0.0",
10+
# ]
11+
# ///
12+
113
import marimo
214

3-
__generated_with = "0.13.11"
15+
__generated_with = "0.13.7"
416
app = marimo.App(width="medium")
517

618

@@ -10,11 +22,9 @@ def _():
1022
return (mo,)
1123

1224

13-
@app.cell
25+
@app.cell(hide_code=True)
1426
def _(mo):
15-
mo.md(
16-
r"""# Eager vs Lazy DataFrames: One Fix to Make Your Code Work Anywhere"""
17-
)
27+
mo.md(r"""# Eager vs Lazy DataFrames: One Fix to Make Your Code Work Anywhere""")
1828
return
1929

2030

@@ -44,7 +54,7 @@ def _():
4454
return (data,)
4555

4656

47-
@app.cell
57+
@app.cell(hide_code=True)
4858
def _(mo):
4959
mo.md(r"""## Eager-only solution""")
5060
return
@@ -70,9 +80,8 @@ def agnostic_ffill_by_store(df_native: IntoFrameT) -> IntoFrameT:
7080

7181
@app.cell
7282
def _(agnostic_ffill_by_store, data):
73-
import polars as pl
7483
import pandas as pd
75-
import pyarrow as pa
84+
import polars as pl
7685

7786
# pandas.DataFrame
7887
df_pandas = pd.DataFrame(data)
@@ -93,7 +102,7 @@ def _():
93102
return (duckdb_rel,)
94103

95104

96-
@app.cell
105+
@app.cell(hide_code=True)
97106
def _(mo):
98107
mo.md(r"""## Eager and lazy solution""")
99108
return
@@ -128,10 +137,5 @@ def _(agnostic_ffill_by_store_improved, df_pandas):
128137
return
129138

130139

131-
@app.cell
132-
def _():
133-
return
134-
135-
136140
if __name__ == "__main__":
137141
app.run()

public/data_science_tools/narwhals.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)