I have DataFrame like below:
df = pd.DataFrame({"ID" : ["1", "1", "1", "2", "2", "2", "1"],
"status" : ["ac", "not", "not", "ac", np.NaN, "ac", "oth"]})
And I need to build DataFrame with columns like below:
- NumberAcc - Number of ID with status = "ac"
- NumberNaN - Number of ID with status = NanN (missing -> np.nan)
- NumberOther - Number of ID with staatus other than "ac" or np.nan (means "not" or "oth")
Could you help me to build DF like below?
