1#dropping columns having more than 50% missing values(1994/2==1000)
2df=df.dropna(thresh=1000,axis=1)
3
1>>>df = pd.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'],
2 "toy": [np.nan, 'Batmobile', 'Bullwhip'],
3 "born": [pd.NaT, pd.Timestamp("1940-04-25"),
4 pd.NaT]})
5df.dropna(thresh=2)
6 name toy born
71 Batman Batmobile 1940-04-25
82 Catwoman Bullwhip NaT
9