susanli2016 / NLP-with-Python

Scikit-Learn, NLTK, Spacy, Gensim, Textblob and more
2.74k stars 2.02k forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0 #29

Open chetanshekhu opened 3 years ago

chetanshekhu commented 3 years ago

doc_sample = documents[documents['index'] == 4310].values[0][0]

print('original document: ') words = [] for word in doc_sample.split(' '): words.append(word) print(words) print('\n\n tokenized and lemmatized document: ') print(preprocess(doc_sample))

when I am running these lines in my document its showing indexerror please help IndexError: index 0 is out of bounds for axis 0 with size 0