Skip to content

BUG: skipna parameter in series.any() returns wrong result #23109

Closed
@kaybhutani

Description

@kaybhutani
#importing pandas module 
import pandas as pd 

#importing numpy module
import numpy as np

data=pd.DataFrame({'A':[1,2,3,4,0,np.nan,3],
                  'B':[3,1,4,5,0,np.nan,5]})

data.any(axis=1,skipna=True)

Expected output:
0 True
1 True
2 True
3 True
4 False
5 True
6 True
dtype: bool

Returned output:

0 True
1 True
2 True
3 True
4 False
5 False
6 True
dtype: bool

As written in documentation, If an entire row/column is NA, the result will be NA
But NA isn't returned in any of the cases (Keeping skipna True or False)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions