dlab-berkeley / Data-Science-Social-Justice

Materials for D-Lab / UC Berkeley Graduate Division's Data Science for Social Justice summer workshop. These materials provide an introduction to Python, natural language processing, text analysis, word embeddings, and network analysis. They also include discussions on critical approaches to data science to promote social justice.
11 stars 7 forks source link

Module 3: Preprocessing_Lesson Type Error #20

Open emilygrabowski opened 1 year ago

emilygrabowski commented 1 year ago

In DataHub- Under 'Removing Null Values', I had to change: df = df.dropna(subset='selftext')--> df = df.dropna(subset=['selftext']). The original gave this error: TypeError: Index(...) must be called with a collection of some kind, 'selftext' was passed