0

it's my first time using stackoverflow to ask a question so pls let me know if i'm doing anything wrong (in terms of asking) my data looks like this now - as attached - I'm wondering if there's any way to create a binary column that indicates records with missing values as my goal is to obtain the proportion of records with missing values for each country. thanks enter image description here

1 Answers1

0

This question was partially answered here: How to select rows with one or more nulls from a pandas DataFrame without listing columns explicitly? For this case the answer is:

wv['row_has_nan'] = wv.isnull().any(axis=1)
Sergey Dyshko
  • 315
  • 1
  • 5