Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken with Pandas 1.2 #51

Closed
rgieseke opened this issue Dec 28, 2020 · 1 comment · Fixed by #53
Closed

Broken with Pandas 1.2 #51

rgieseke opened this issue Dec 28, 2020 · 1 comment · Fixed by #53

Comments

@rgieseke
Copy link
Contributor

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
Copy link
Contributor Author

The change seems to be here:
pandas-dev/pandas@89cc5bf

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

rgieseke added a commit to rgieseke/pint-pandas that referenced this issue Jan 1, 2021
Closes hgrecco#51

`get_op_name` was removed in
pandas-dev/pandas@89cc5bf901fc3

```
def _get_op_name(op, special: bool) -> str:
    opname = op.__name__.strip("_")
    if special:
        opname = f"__{opname}__"
    return opname
```

"""")""""""
rgieseke added a commit to rgieseke/pint-pandas that referenced this issue Jan 1, 2021
Closes hgrecco#51

`get_op_name` was removed in
pandas-dev/pandas@89cc5bf901fc3

```
def _get_op_name(op, special: bool) -> str:
    opname = op.__name__.strip("_")
    if special:
        opname = f"__{opname}__"
    return opname
```
rgieseke added a commit to rgieseke/pint-pandas that referenced this issue Jan 1, 2021
Closes hgrecco#51

`get_op_name` was removed in
pandas-dev/pandas@89cc5bf901fc3

```
def _get_op_name(op, special: bool) -> str:
    opname = op.__name__.strip("_")
    if special:
        opname = f"__{opname}__"
    return opname
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant