NaN share Pandas error | Sololearn: Learn to code for FREE!

NaN share Pandas error

Task:Explore the share of NaNs for each of the given columns. Print these values import pandas as pd import numpy as np data = pd.read_csv('') cols = ['Cabin', 'Embarked'] print(data['Cabin'].isna().sum()/len(data['Cabin'])) print(data['Embarked'].isna().sum()/len(data['Embarked'])) The last 2 lines are by me. Help, where the errors are?

1st Aug 2022, 8:13 AM
LI HAN - avatar
1 ответ
+ 1
You can link your code like this: Go to Code section, click +, select the programming language, insert your code, save. Come back to this thread, click +, Insert Code, sort for My Code Bits, select your code. If it is a sololearn task, please mention course name and task number.
1st Aug 2022, 9:30 AM
Lisa - avatar