Q. Write a Python program to select the rows where the score is missing, i.e.,


NaN. exam_data = {'name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', Michael', 'Matthew', 'Laura', 'Kevin', 'Jonas'], 'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19], 'attempts': [1, 3, 2, 3, 2, 3, 1, 1, 2, 1], 'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}

labels ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']

Answer :-

print(df[df.isnull().any(axis = 1)])

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post