Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for serializing polars DataFrame #7475

Merged
merged 4 commits into from
Jan 20, 2025
Merged

Conversation

philippjfr
Copy link
Member

Partial fix for #7468

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

Copy link

codecov bot commented Nov 8, 2024

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.

panel/io/datamodel.py Outdated Show resolved Hide resolved
panel/io/datamodel.py Outdated Show resolved Hide resolved
@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Nov 8, 2024

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
Member Author

pre-commit.ci autofix

panel/io/datamodel.py Outdated Show resolved Hide resolved
@philippjfr
Copy link
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
15 of 16 checks passed
@philippjfr philippjfr deleted the polars_serialize branch January 20, 2025 22:58
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.

3 participants