Skip to content

Ensure rx._callback resolves accessors #949

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

Merged
merged 2 commits into from
Jun 24, 2024
Merged

Ensure rx._callback resolves accessors #949

merged 2 commits into from
Jun 24, 2024

Conversation

philippjfr
Copy link
Member

Previously accessors weren't resolved correctly.

Copy link

codecov bot commented Jun 24, 2024

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
Copy link
Member

maximlt commented Jun 24, 2024

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
10 of 11 checks passed
@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