More idiomatic version of "df.isnull().any().any()" w/ a Pandas DataFrame?
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Book End
--
Chapters
00:00 More Idiomatic Version Of &Quot;Df.Isnull().Any().Any()&Quot; W/ A Pandas Dataframe?
00:20 Accepted Answer Score 4
00:31 Thank you
--
Full question
https://stackoverflow.com/questions/2431...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #pandas
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Book End
--
Chapters
00:00 More Idiomatic Version Of &Quot;Df.Isnull().Any().Any()&Quot; W/ A Pandas Dataframe?
00:20 Accepted Answer Score 4
00:31 Thank you
--
Full question
https://stackoverflow.com/questions/2431...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #pandas
#avk47
ACCEPTED ANSWER
Score 4
I think it's to use numpy's any:
In [11]: df = pd.DataFrame([[1, 2], [3, np.nan]])
In [12]: df.isnull().any().any()
Out[12]: True
In [13]: np.any(df.isnull())
Out[13]: True