Skip to content

Error with pandas Dataframe.applymap usage with latest pandas=3.0.2 #10

@ppreshant

Description

@ppreshant

I get this error when running rhea with the latest version of pandas (on the python_package_i8 branch)

#..relevant part ..
    File "/home/Users/pbk1/micromamba/nextflow-envs/env-d9a9ecdd3555ab49126ab526992cea78/lib/python3.13/site-packages/rhea/core.py", line 487, in calculate_diff_to_nodes_df
      df_nodes_coverage[coverage_cols].applymap(lambda x: 1 if x < 1 else x)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/Users/pbk1/micromamba/nextflow-envs/env-d9a9ecdd3555ab49126ab526992cea78/lib/python3.13/site-packages/pandas/core/generic.py", line 6206, in __getattr__
      return object.__getattribute__(self, name)
             ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  AttributeError: 'DataFrame' object has no attribute 'applymap'

Fix:

df_nodes_coverage[coverage_cols].applymap -> need to change to .map

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions