Skip to content

Ensure rx._callback resolves accessors - #949

Merged
maximlt merged 2 commits into
mainfrom
rx_resolve_accessor
Jun 24, 2024
Merged

maximlt merged 2 commits into
mainfrom
rx_resolve_accessor

Conversation

@philippjfr

Copy link
Copy Markdown
Member

Previously accessors weren't resolved correctly.

@codecov

codecov Bot commented Jun 24, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.70%. Comparing base (c0fa26e) to head (008394c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #949      +/-   ##
==========================================
+ Coverage   86.53%   86.70%   +0.16%     
==========================================
  Files          10       10              
  Lines        5148     5151       +3     
==========================================
+ Hits         4455     4466      +11     
+ Misses        693      685       -8     

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

@maximlt

maximlt commented Jun 24, 2024

Copy link
Copy Markdown
Member

Here's how to reproduce the reported issue. The output should display the accessor str method (e.g. <pandas.core.strings.accessor.StringMethods at 0x122c71ee0>), not the island Series. I added a simple unit test.

Code

import pandas as pd
import param

from param import rx

URL = 'https://datasets.holoviz.org/penguins/v1/penguins.csv'
df = rx(pd.read_csv(URL))

df['island'].str

image

@maximlt
maximlt merged commit 853c42b into main Jun 24, 2024
@maximlt
maximlt deleted the rx_resolve_accessor branch June 24, 2024 21:18
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