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
Asked
Active
Viewed 202 times
0
-
Could you provide what you have tried? – theEpsilon Sep 28 '20 at 16:38
-
Please be more clear about what you're doing, what technologies you're using, etc. But basically sounds like you just need to read up on how to make a data model, using whatever database solution you're using. – Tyler Gannon Sep 28 '20 at 17:19
-
thanks guys, i'll try to think about it first then see how to ask better – chenxi xu Sep 28 '20 at 20:49
1 Answers
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