Skip to content

Broaden Polars input support via narwhals normalization#298

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-polars-support-narwhals
Draft

Broaden Polars input support via narwhals normalization#298
Copilot wants to merge 3 commits intomainfrom
copilot/add-polars-support-narwhals

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

TimeCopilot accepted Polars only in limited paths. This extends Polars acceptance across public APIs while clarifying that inputs are normalized to pandas for downstream model compatibility.

  • Library-wide dataframe normalization

    • Apply to_pandas at all model and forecaster entry points (stats, ML, neural, foundation, adapters, ensembles, parallel/gluonts utilities) to accept Polars and other narwhals-backed frames consistently.
  • Docs update

    • Clarify that Polars inputs are supported but normalized to pandas before modeling.
  • Polars-focused validation

    • Strengthen tests around narwhals conversion, fallback behavior, and dataset validation.
import polars as pl
from timecopilot import TimeCopilot

df = pl.DataFrame({"unique_id": ["a"], "ds": ["2024-01-01"], "y": [1.0]})
tc = TimeCopilot()
fcst = tc.forecast(df=df, h=7, freq="D")

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: AzulGarza <10517170+AzulGarza@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for polars via narwhals Add narwhals-backed Polars dataframe support Jan 28, 2026
Copilot AI requested a review from AzulGarza January 28, 2026 07:12
Co-authored-by: AzulGarza <10517170+AzulGarza@users.noreply.github.com>
Copilot AI changed the title Add narwhals-backed Polars dataframe support Broaden Polars input support via narwhals normalization Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants