Counting missing values in pandas
What does this code print?
import pandas as pd
import numpy as np
df = pd.DataFrame({'a': [1, np.nan, 3], 'b': [np.nan, np.nan, 6]})
print(df.isna().sum().tolist())Discussion 0
Join free to post in the discussion.
Related questions
- pandas mean with a missing valueData Scientist
- value_counts with normalizeData Scientist
- COUNT of a column with NULLsData Scientist
- Dates read as plain textData Scientist
- Keeping the latest row per emailData Scientist
- Sorting by city then by salesData Scientist
- Getting the weekday from a date columnData Scientist
- A random sample that repeatsData Scientist