-
Notifications
You must be signed in to change notification settings - Fork 34
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
AttributeError: module 'pandas.core.ops' #248
Comments
UPDATE: Looking at the Jupyter consoile output, I see: [IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control when import text_extensions_for_pandas fails A Google search of this error string shows it has been reported for other packages (not text_extensions_for_pandas) So I doubt it is a fixable TEXT_EXTENSIONS_FOR_PANDAS |
FIXED -- for me |
Glad this issue is resolved for you now. Let us know if you have any other problems. |
I am running on Windows 10 Intel i5
and get import error with
import pandas as pd
import text_extensions_for_pandas as tp
when run in Jupyter Notebook
the relevant error code is
AttributeError: module 'pandas.core.ops' has no attribute '_get_op_name'
imports worked 6 weeks ago fail now and
I have no problem with import text_extensions_for_pandas not in Jupyter
I tried to create a virtenv just for this problem and installed full pip install of pandas, text_extensions_for_pandas and jupyter
and I see the same error only in Jupyter
see ERROR in context for more detail
Versions
pandas 1.3.5
and
Selected Jupyter core packages...
IPython : 7.34.0
ipykernel : 6.15.2
ipywidgets : 8.0.2
jupyter_client : 7.3.5
jupyter_core : 4.11.1
jupyter_server : not installed
jupyterlab : not installed
nbclient : 0.6.7
nbconvert : 7.0.0
nbformat : 5.4.0
notebook : 6.4.12
qtconsole : 5.3.2
traitlets : 5.3.0
I am not 100% sure of the text_extensions_for_pandas versions maybe 0.2.0
(text_pandas) C:\Users\mdbol\Desktop\virtenv\text_pandas>pip install text_extensions_for_pandas
Collecting text_extensions_for_pandas
Using cached text_extensions_for_pandas-0.2.0-py3-none-any.whl (199 kB)
ERROR In context:
~\AppData\Local\Programs\Python\Python37\lib\site-packages\text_extensions_for_pandas\array_init_.py in
25 from text_extensions_for_pandas.array.char_span import *
26 from text_extensions_for_pandas.array.token_span import *
---> 27 from text_extensions_for_pandas.array.tensor import *
28 from text_extensions_for_pandas.array.accessor import *
29
~\AppData\Local\Programs\Python\Python37\lib\site-packages\text_extensions_for_pandas\array\tensor.py in
281
282 # Add operators from the mixin to the class
--> 283 TensorArray._add_arithmetic_ops()
284 TensorArray._add_comparison_ops()
~\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\arrays\base.py in _add_arithmetic_ops(cls)
1342 @classmethod
1343 def _add_arithmetic_ops(cls):
-> 1344 setattr(cls, "add", cls._create_arithmetic_method(operator.add))
1345 setattr(cls, "radd", cls._create_arithmetic_method(ops.radd))
1346 setattr(cls, "sub", cls._create_arithmetic_method(operator.sub))
~\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\arrays\base.py in _create_arithmetic_method(cls, op)
1495 @classmethod
1496 def _create_arithmetic_method(cls, op):
-> 1497 return cls._create_method(op)
1498
1499 @classmethod
~\AppData\Local\Programs\Python\Python37\lib\site-packages\text_extensions_for_pandas\array\tensor.py in _create_method(cls, op, coerce_to_dtype)
92 return TensorArray(res)
93
---> 94 op_name = ops._get_op_name(op, True)
95 return set_function_name(_binop, op_name, cls)
96
AttributeError: module 'pandas.core.ops' has no attribute '_get_op_name'
The text was updated successfully, but these errors were encountered: