[Coming soon] Support Polars objects for cache hashing #10347
Labels
feature:cache
Related to st.cache_data and st.cache_resource
feature:cache-hash-func
type:enhancement
Requests for feature enhancements or new features
Checklist
Summary
When passing a Polars dataframe to a function that is decorated with
@st.cache_data
, you get the following error:Follow-up of #5088 (comment)
Why?
I want to be able to cache functions that have a Polars dataframe as input.
How?
There is already support for Pandas dataframes:
streamlit/lib/streamlit/runtime/caching/hashing.py
Lines 434 to 453 in 9914751
Support for Polars dataframes could be implemented the same way.
Alternative: Use https://github.com/narwhals-dev/narwhals for a dataframe-agnostic implementation.
Additional Context
No response
The text was updated successfully, but these errors were encountered: