king-michael / simulation_database

Apache License 2.0
1 stars 1 forks source link

DatabaseViewer: 'Series' object has no attribute 'notna' #9

Closed king-michael closed 6 years ago

king-michael commented 6 years ago

Problem:

AttributeError: 'Series' object has no attribute 'notna'

king-michael commented 6 years ago

Series don't have the attribute .notna() with old pandas versions (0.20.3). Its introduced in 0.21 as alias for .notnull()

Solutions

Solution 1: Update pandas

upgrade to at least : 0.21 (not test which version is the minimum) pip install pandas --upgrade

Solution 2: use .notnull()

.notna() is an alias for .notnull() so we move : .isna() => .isnull() and .notna() => .notnull() so it will work with older versions

king-michael commented 6 years ago

Solution: add minimum requirement in setup.py install_requires=[... , 'pandas>=0.21', ...]