I have an Excel file with 10000 customer ratings. Each row is a rating (row 1 = rating 1; row 2 = rating 2, … ). I import these into Jupyter Notebook and clean them up. (lematization, remove stopwords, …)
The result looks like this:
print(data_lemmatized[:2])
[ [ ], [“practical”, “recommendation”], [“miserable”, “confusing”], … ]
As some ratings are only very short, for example only one emoji, the list in the list here is empty. When exporting to excel, these empty lists are not displayed. After export there are no longer 10000, but only 9000 lines. This makes an assignment to the authors impossible.
Can you please help me to find a way to export the empty lines as well?
Thank you very much
(I tried to add a unique character to each list in Python. For example the number “77777”, which does not appear in any other customer rating. However, this number is only added to the first and all filled lists.)
Uriaah is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.