Skip to content

isnull not working for object series with NaT #6033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cancan101 opened this issue Jan 22, 2014 · 2 comments
Closed

isnull not working for object series with NaT #6033

cancan101 opened this issue Jan 22, 2014 · 2 comments
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@cancan101
Copy link
Contributor

In [694]:
series = pd.Series([pd.NaT, '1'])
series[~pd.isnull(series)]

Out[694]:
0    NaN
1      1
dtype: object

Possibly related: #5967 (comment)

@jreback
Copy link
Contributor

jreback commented Jan 22, 2014

On master this works

(aside from the display issue)

Pls feel free to create a test for this though

In [5]: s = pd.Series([pd.NaT,'1'])

In [6]: s
Out[6]: 
0    NaN
1      1
dtype: object

In [7]: pd.isnull(s)
Out[7]: 
0     True
1    False
dtype: bool

In [8]: s[pd.isnull(s)]
Out[8]: 
0   NaT
dtype: datetime64[ns]

In [9]: s[~pd.isnull(s)]
Out[9]: 
1    1
dtype: object

@jreback
Copy link
Contributor

jreback commented Jan 23, 2014

this was closed by #5443

@jreback jreback closed this as completed Jan 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants