Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion marimo/_plugins/ui/_impl/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,10 @@ def __init__(
data: ListOrTuple[str | int | float | bool | MIME | None]
| ListOrTuple[dict[str, JSONType]]
| dict[str, ListOrTuple[JSONType]]
| IntoDataFrame,
| list[dict[str, Any]]
| dict[str, list[Any]]
| IntoDataFrame
| IntoLazyFrame,
Comment on lines +546 to +547
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. Users passing a lazy frame directly should use table.lazy() for proper lazy behavior, this is existing guidance and unchanged by this PR. The type annotation accurately reflects what the runtime accepts.

pagination: bool | None = None,
selection: Literal["single", "multi", "single-cell", "multi-cell"]
| None = "multi",
Expand Down
5 changes: 4 additions & 1 deletion marimo/_plugins/ui/_impl/utils/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Any, TypeVar, Union

from narwhals.typing import IntoDataFrame
from narwhals.typing import IntoDataFrame, IntoLazyFrame

from marimo import _loggers
from marimo._output.data import data as mo_data
Expand Down Expand Up @@ -69,8 +69,11 @@ def get_default_csv_encoding() -> str:
list[JSONType],
ListOrTuple[Union[str, int, float, bool, MIME, None]],
ListOrTuple[dict[str, JSONType]],
list[dict[str, Any]],
dict[str, list[Any]],
dict[str, ListOrTuple[JSONType]],
Comment on lines 71 to 74
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. list[dict[str, Any]] and dict[str, list[Any]] are now included in TableData

IntoDataFrame,
IntoLazyFrame,
]


Expand Down
Loading