Skip to content

Add support for serializing polars DataFrame - #7475

Merged
philippjfr merged 4 commits into
mainfrom
polars_serialize
Jan 20, 2025
Merged

Add support for serializing polars DataFrame#7475
philippjfr merged 4 commits into
mainfrom
polars_serialize

Conversation

@philippjfr

Copy link
Copy Markdown
Member

Partial fix for #7468

We additionally need to allow param.DataFrame to accept non-pandas DataFrames, either by default or as an option.

@codecov

codecov Bot commented Nov 8, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 55.55556% with 8 lines in your changes missing coverage. Please review.

Project coverage is 86.72%. Comparing base (64e9992) to head (90a764c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
panel/io/datamodel.py 55.55% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7475       +/-   ##
===========================================
+ Coverage   71.66%   86.72%   +15.06%     
===========================================
  Files         345      346        +1     
  Lines       52032    52051       +19     
===========================================
+ Hits        37287    45143     +7856     
+ Misses      14745     6908     -7837     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread panel/io/datamodel.py Outdated
Comment thread panel/io/datamodel.py Outdated
@MarcSkovMadsen

MarcSkovMadsen commented Nov 8, 2024

Copy link
Copy Markdown
Collaborator

Partial fix for #7468

We additionally need to allow param.DataFrame to accept non-pandas DataFrames, either by default or as an option.

My vision for the DataFrame parameter is that there is a parameter that supports any kind of tabular data source including the ones supported by Narwhals. See narwhals-dev/narwhals#1289. This means broading the concept from DataFrame to Tabular or Columnar data source. Why can't I use a database as the remote backend for Tabulator? Or a .parquet file?

@philippjfr

Copy link
Copy Markdown
Member Author

pre-commit.ci autofix

Comment thread panel/io/datamodel.py Outdated
@philippjfr

Copy link
Copy Markdown
Member Author

This change won't do anything yet but it makes sense to merge in anticipation to the coming changes in param.

@philippjfr
philippjfr merged commit 838fcc3 into main Jan 20, 2025
@philippjfr
philippjfr deleted the polars_serialize branch January 20, 2025 22:58
@github-actions

github-actions Bot commented Sep 9, 2025

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants