threshold meaning in pandas dropna

Solutions on MaxInterview for threshold meaning in pandas dropna by the best coders in the world

showing results for - "threshold meaning in pandas dropna"
Giovanni
03 Jan 2020
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