0

I am getting this error after I am running:

(100*df.isna().sum()/df.shape[0]).round(1)

I use Jupyter (Anaconda).

This is the full error i get:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-20-e4ddd4ac043f> in <module>
----> 1 (100*df.isna().sum()/df.shape[0]).round(1)

~\Anaconda3\lib\site-packages\pandas\core\ops\__init__.py in wrapper(left, right)
   1046 
   1047         with np.errstate(all="ignore"):
-> 1048             result = na_op(lvalues, rvalues)
   1049         return construct_result(
   1050             left, result, index=left.index, name=res_name, dtype=None

~\Anaconda3\lib\site-packages\pandas\core\ops\__init__.py in na_op(x, y)
    963         TypeError : invalid operation
    964         """
--> 965         import pandas.core.computation.expressions as expressions
    966 
    967         try:

~\Anaconda3\lib\site-packages\pandas\core\computation\expressions.py in <module>
     17 from pandas.core.dtypes.generic import ABCDataFrame
     18 
---> 19 from pandas.core.computation.check import _NUMEXPR_INSTALLED
     20 
     21 if _NUMEXPR_INSTALLED:

~\Anaconda3\lib\site-packages\pandas\core\computation\check.py in <module>
      1 from pandas.compat._optional import import_optional_dependency
      2 
----> 3 ne = import_optional_dependency("numexpr", raise_on_missing=False, on_version="warn")
      4 _NUMEXPR_INSTALLED = ne is not None
      5 if _NUMEXPR_INSTALLED:

~\Anaconda3\lib\site-packages\pandas\compat\_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version)
     97     minimum_version = VERSIONS.get(name)
     98     if minimum_version:
---> 99         version = _get_version(module)
    100         if distutils.version.LooseVersion(version) < minimum_version:
    101             assert on_version in {"warn", "raise", "ignore"}

~\Anaconda3\lib\site-packages\pandas\compat\_optional.py in _get_version(module)
     46 
     47     if version is None:
---> 48         raise ImportError("Can't determine version for {}".format(module.__name__))
     49     return version
     50 

ImportError: Can't determine version for numexpr

It started just after I had updated my scikit-learn. I tried this , And I still have this problem. What can I do in order to fix it?

Amit S
  • 225
  • 6
  • 16
  • Please post a [MCVE](https://stackoverflow.com/help/minimal-reproducible-example) as well as the full traceback showing the error. – a_guest Jan 04 '20 at 23:46

0 Answers0