hgrecco / pint-pandas

Pandas support for pint
Other
170 stars 42 forks source link

Broken with Pandas 1.2 #51

Closed rgieseke closed 3 years ago

rgieseke commented 3 years ago

Pandas 1.2 seems to have broken pint-pandas

/Work/pint-pandas/pint_pandas/pint_array.py in _create_method(cls, op, coerce_to_dtype)
    615             return res
    616 
--> 617         op_name = ops._get_op_name(op, True)
    618         return set_function_name(_binop, op_name, cls)
    619 

AttributeError: module 'pandas.core.ops' has no attribute '_get_op_name'
rgieseke commented 3 years ago

The change seems to be here: https://github.com/pandas-dev/pandas/commit/89cc5bf901fc3ea083e55e426e916d5a77c5a6b9

    op_name = _get_op_name(op, special)
    op_name = op.__name__.strip("_")