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

enh: Support polars in pn.cache #7472

Merged
merged 6 commits into from
Nov 8, 2024
Merged

enh: Support polars in pn.cache #7472

merged 6 commits into from
Nov 8, 2024

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Nov 7, 2024

Resolves #7467

I need to add a test.

import polars as pl
from panel.io.cache import _polars_hash

df = pl.DataFrame({"column1": [1, 2, 3], "column2": ["a", "b", "c"]})

_polars_hash(df), _polars_hash(df.lazy()), _polars_hash(df["column1"])

image

@hoxbro hoxbro marked this pull request as draft November 7, 2024 15:46
Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

Looks good, tests would be great.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 93.22034% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.32%. Comparing base (c06f779) to head (9cbf808).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
panel/io/cache.py 90.24% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7472      +/-   ##
==========================================
+ Coverage   82.30%   82.32%   +0.02%     
==========================================
  Files         338      338              
  Lines       50819    50889      +70     
==========================================
+ Hits        41825    41896      +71     
+ Misses       8994     8993       -1     

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

@hoxbro hoxbro marked this pull request as ready for review November 7, 2024 18:49
@hoxbro hoxbro changed the title enh: Support polars in pn.cache enh: Support polars in pn.cache Nov 7, 2024
@philippjfr philippjfr merged commit 28604f2 into main Nov 8, 2024
18 checks passed
@philippjfr philippjfr deleted the polars_cache branch November 8, 2024 10: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.

Polars: ValueError("Could not hash object of type function").
2 participants