Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

ui.dataframe: use polars codegen for lazyframe (#7314)

Shahmir Varqhae5ead5078720
diff --git a/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py b/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py
index b680c49fc8..385a619225 100644
--- a/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py
+++ b/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py
@@ -347,7 +347,7 @@ class NarwhalsTransformHandler(TransformHandler[DataFrame]):
return python_print_transforms(
df_name, columns, transforms, python_print_pandas
)
- elif nw.dependencies.is_polars_dataframe(native_df):
+ elif _is_polars_dataframe_or_lazyframe(native_df):
return python_print_transforms(
df_name, columns, transforms, python_print_polars
)