Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

RecursionError when using pandas 1.5.1 #2

Description

@pynomaly

There is a bug in pandas 1.5.1 and we get this error message when using ictiopy.load_zipdb():

RecursionError: maximum recursion depth exceeded while calling a Python object

The error is due to this line:

bdb = bdb.replace(np.nan, None, regex=True)

The bug is documented here: pandas-dev/pandas#45725

The bug is closed and will be fixed for pandas version 1.5.2. In the meanwhile, they recommend to use pandas 1.4.7.

Other methods are working to replace np.nan by None, like this:

bdb_data = bdb_data.astype(object).replace(np.nan, 'None')

This and others are pointed here: https://stackoverflow.com/questions/14162723/replacing-pandas-or-numpy-nan-with-a-none-to-use-with-mysqldb

If you prefer to keep the code as it is right now I can add a pandas != 1.5.0, 1.5.1 in the requirements of mecoda-orange.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions