textClassifier icon indicating copy to clipboard operation
textClassifier copied to clipboard

AttributeError: 'DataFrame' object has no attribute 'review'

Open mowangshao opened this issue 7 years ago • 3 comments

Using TensorFlow backend. (111, 1) Traceback (most recent call last): File "textClassifierHATT.py", line 55, in for idx in range(data_train.review.shape[0]): File "/root/anaconda3/envs/py2/lib/python2.7/site-packages/pandas/core/generic.py", line 3081, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'review'

mowangshao avatar Oct 30 '18 01:10 mowangshao

for idx in range(data_train.review.shape[0]): text = BeautifulSoup(data_train.review[idx]) I find there are many attribute 'review' is used but I can not find the 'review' in google. How can I solve the problem?

mowangshao avatar Oct 30 '18 01:10 mowangshao

Em, I use the tensorflow-cpu version.

mowangshao avatar Oct 30 '18 01:10 mowangshao

I fixed this problem. Just use wget https://raw.githubusercontent.com/MatthieuBizien/Bag-popcorn/master/labeledTrainData.tsv to replace wget https://www.kaggle.com/c/word2vec-nlp-tutorial/download/labeledTrainData.tsv.

mowangshao avatar Nov 08 '18 06:11 mowangshao