Could someone please explain what the following error is about. Following is my code:
import pandas as pd
from pandas import DataFrame
data =pd.read_csv('FILENAME')
b=data.info()
print b
Following is the error:
Traceback (most recent call last): File
"FILENAME", line 5, in <module>
b=data.info() File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 1443, in
info
counts = self.count() File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 3862, in
count
result = notnull(frame).sum(axis=axis) File "/usr/lib/python2.7/dist-packages/pandas/core/common.py", line 276, in
notnull
return -res File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 604, in
__neg__
arr = operator.neg(_values_from_object(self))
TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~`
operator or the logical_not function instead.
All I am trying to do is display a summary of my dataset using the Dataframe.info() function, and I am having trouble trying to make sense of the error. Although I do feel it has something to do with the numpy package altogether. What needs to be done here?
FILENAMEexist?data.info()it won't return anything