holoviz / param

Param: Make your Python code clearer and more reliable by declaring Parameters
https://param.holoviz.org
BSD 3-Clause "New" or "Revised" License
410 stars 69 forks source link

Ensure rx._callback resolves accessors #949

Closed philippjfr closed 1 week ago

philippjfr commented 1 week ago

Previously accessors weren't resolved correctly.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

maximlt commented 1 week ago

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

```python 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