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

importing janitor fails #1391

Closed andersnev closed 3 months ago

andersnev commented 3 months ago

Brief Description

TypeError when importing janitor after updating to 0.28.0

System Information

Minimally Reproducible Code

import janitor

Error Messages

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  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 43, in <module>
    from .expand_grid import cartesian_product, expand, expand_grid
  File "/workdir/.venv/lib/python3.8/site-packages/janitor/functions/expand_grid.py", line 143, in <module>
    by: str | list = None,
TypeError: unsupported operand type(s) for |: 'type' and 'type'
samukweku commented 3 months ago

@andersnev thanks for the feedback. we just pushed a patch that should fix this. Kindly uninstall and reinstall pyjanitor and let's know if the error persists.

andersnev commented 3 months ago

Reinstalled pyjanitor and it works :)