Two errors with the Rossman lesson (Lesson 3)

I get two problems when doing Lesson 3 (Lesson 4 on the lectures).

One is a warning
/home/paperspace/anaconda3/envs/fastai/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
from numpy.core.umath_tests import inner1d

The other is an error when I try to run for t in tables: display(DataFrameSummary(t).summary())

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-5ccf154bd414> in <module>()
----> 1 for t in tables: display(DataFrameSummary(t).summary())

~/anaconda3/envs/fastai/lib/python3.6/site-packages/pandas_summary/__init__.py in __init__(self, df)
     25         self.df = df
     26         self.length = len(df)
---> 27         self.columns_stats = self._get_stats()
     28         self.corr = df.corr()
     29 

~/anaconda3/envs/fastai/lib/python3.6/site-packages/pandas_summary/__init__.py in _get_stats(self)
     87         # settings types
     88         stats['types'] = ''
---> 89         columns_info = self._get_columns_info(stats)
     90         for ctype, columns in columns_info.items():
     91             stats.ix[columns, 'types'] = ctype

~/anaconda3/envs/fastai/lib/python3.6/site-packages/pandas_summary/__init__.py in _get_columns_info(self, stats)
    109                                         self.EXCLUDE,
    110                                         column_info['constant'].union(column_info['bool']))
--> 111         column_info[self.TYPE_NUMERIC] = pd.Index([c for c in rest_columns
    112                                                    if common.is_numeric_dtype(self.df[c])])
    113         rest_columns = self.get_columns(self.df[rest_columns], self.EXCLUDE, column_info['numeric'])

~/anaconda3/envs/fastai/lib/python3.6/site-packages/pandas_summary/__init__.py in <listcomp>(.0)
    110                                         column_info['constant'].union(column_info['bool']))
    111         column_info[self.TYPE_NUMERIC] = pd.Index([c for c in rest_columns
--> 112                                                    if common.is_numeric_dtype(self.df[c])])
    113         rest_columns = self.get_columns(self.df[rest_columns], self.EXCLUDE, column_info['numeric'])
    114         column_info[self.TYPE_DATE] = pd.Index([c for c in rest_columns

AttributeError: module 'pandas.core.common' has no attribute 'is_numeric_dtype'

I looked for a solution to both on the forums but couldn’t find it (the closest I got was this link, but none of the solutions worked)

Please help!

1 Like

Those warnings are not things to be worried about. The error on the other hand has a solution on Stackoverflow: https://stackoverflow.com/a/50828177/6304086

1 Like

The RuntimeWarnings are coming from Cython and can be ignored. StackOverflow has a good question on this topic. There are ways to recompile or downgrade numpy to remove the RuntimeWarnings, but it’s a lot of unnecessary work.