Jul-26-2020, 07:46 PM
Hi,
I have this code below, I'm trying to drop rows with missing values, and I'm trying to use DataFrame.dropna(), But when I test below the rows were not dropped, please help. I have attached my data set as well.
I have this code below, I'm trying to drop rows with missing values, and I'm trying to use DataFrame.dropna(), But when I test below the rows were not dropped, please help. I have attached my data set as well.
import pandas as pd
recent_grads = pd.read_csv('recent-grads.csv')
print(recent_grads['Low_wage_jobs'].value_counts().sort_index().head())
print(len(recent_grads))
recent_grads = recent_grads.dropna()
print(recent_grads['Low_wage_jobs'].value_counts().sort_index().head())
print(len(recent_grads))
