Skip to content
Quiz · NumPy and pandas · lesson 9 of 12

Quiz — counting missing values

What does this program print?

Python
import numpy as np
import pandas as pd

df = pd.DataFrame({
    "age": [25, np.nan, 31],
    "city": ["Kazan", None, None],
})
print(df.isna().sum().tolist())

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way