Skip to content
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

all nulls should be inferred as generic #136

Closed
majidaldo opened this issue Oct 5, 2020 · 3 comments
Closed

all nulls should be inferred as generic #136

majidaldo opened this issue Oct 5, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@majidaldo
Copy link

i don't think this should be expected behavior.

In [41]: infer_type(pd.DataFrame({'x':['', '']}), StandardSet())
Out[41]: {'x': DateTime}

In [39]: infer_type(pd.DataFrame({'x':[None, None]}), StandardSet())
Out[39]: {'x': Boolean}
@majidaldo majidaldo added the bug Something isn't working label Oct 5, 2020
sbrugman added a commit that referenced this issue Oct 10, 2020
@sbrugman
Copy link
Contributor

@majidaldo Thank you for reporting, these cases weren't handled properly indeed.

Sequences consisting of null values (e.g. np.nan, pd.NaT, None) will be of type Generic from now on.
The sequence of strings with length 0 will be of type String (users can of course override this behaviour).

sbrugman added a commit that referenced this issue Oct 10, 2020
@majidaldo
Copy link
Author

Thanks. And pd.NA?

@sbrugman
Copy link
Contributor

sbrugman commented Oct 11, 2020

pd.NA is also covered. The latest release (v0.6.1) contains the fixes, feel free to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants