pyjanitor-devs / pyjanitor

Clean APIs for data cleaning. Python implementation of R package Janitor
https://pyjanitor-devs.github.io/pyjanitor
MIT License
1.37k stars 170 forks source link

ImportError from pandas module #1409

Closed andersnev closed 1 month ago

andersnev commented 1 month ago

Brief Description

Missing import from pandas.core.dtypes.missing

System Information

Minimally Reproducible Code

import janitor

Error Messages

  File "pyjanitor-test.py", line 1, in <module>
    import janitor
  File "/workdir/.venv/lib/python3.8/site-packages/janitor/__init__.py", line 6, in <module>
    from .functions import *  # noqa: F403, F401
  File "/workdir/.venv/lib/python3.8/site-packages/janitor/functions/__init__.py", line 29, in <module>
    from .conditional_join import conditional_join, get_join_indices
  File "/workdir/.venv/lib/python3.8/site-packages/janitor/functions/conditional_join.py", line 17, in <module>
    from pandas.core.dtypes.missing import (
ImportError: cannot import name 'construct_1d_array_from_inferred_fill_value' from 'pandas.core.dtypes.missing' (/workdir/.venv/lib/python3.8/site-packages/pandas/core/dtypes/missing.py)
samukweku commented 1 month ago

Hi @andersnev. what version of pyjanitor are you on? Can you also try and upgrade your pandas version?

samukweku commented 1 month ago

@andersnev there's a new pyjanitor version (0.29.2) that resolves this issue. Let me know if it doesnt. cheers.

andersnev commented 1 month ago

Works like a charm! Thanks for the quick fix