Your blog: A Comprehensive Guide to Understand and Implement Text Classification in Python



I am new to Python and text analytics and came across your ‘Comprehensive Guide’ so this question may appear basic but when I get to the line[‘text’]) I get the error ***AttributeError: ‘list’ object has no attribute ‘lower’***. I am using Python 3.6.7 in Anaconda. Do I need to convert the corpus to lower before creating the list? If I do then how do I stop it trying to implement the line *** return lambda x: strip_accents(x.lower()) ***?


Hi @bill71,
I just tried this tutorial, but didn’t get any error. Here is the output. It runs fine. you can check trainDF[‘text’] to make sure it is read correctly.