AttributeError: 'DataFrame' object has no attribute 'data'
Closed this issue · 1 comments
dhivya-jayaraman commented
When I try to run the code I get the below error. Please help me with it. Thanks!
Traceback (most recent call last):
File "<ipython-input-3-cde6f3c4c730>", line 1, in <module>
runfile('/Users/dhivyajayaraman/lda6.py', wdir='/Users/dhivyajayaraman')
File "/Users/dhivyajayaraman/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "/Users/dhivyajayaraman/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/Users/dhivyajayaraman/lda6.py", line 15, in <module>
import lda._lda
File "lda.py", line 18, in <module>
documents = dataset.data
File "/Users/dhivyajayaraman/anaconda2/lib/python2.7/site-packages/pandas/core/generic.py", line 2744, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'data'
ariddell commented
Looks like you might be importing a different lda.py
. I don't see documents = dataset.data
in the lda.py
in this module.