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

Add default dtype for empty series #188

Merged

Conversation

mesejo
Copy link
Contributor

@mesejo mesejo commented Apr 18, 2020

In case the content of the series if empty, the code should create the series with a the matching dtype of pandas.

Closes #165

@elasticmachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Few comments:

We should add a test case that returns an empty series and asserts that no warning is raised and that the series is empty and has EMPTY_SERIES_DTYPE as its dtype.

eland/operations.py Outdated Show resolved Hide resolved
@sethmlarson
Copy link
Contributor

Jenkins test this please

@sethmlarson
Copy link
Contributor

Ignore the CI failure, it's unrelated.

@sethmlarson
Copy link
Contributor

Jenkins test this please

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more tiny comments!

eland/tests/dataframe/test_dtypes_pytest.py Outdated Show resolved Hide resolved
eland/operations.py Outdated Show resolved Hide resolved
@sethmlarson
Copy link
Contributor

Jenkins test this please

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome!! :D

@sethmlarson sethmlarson merged commit a779f04 into elastic:master Apr 19, 2020
@sethmlarson
Copy link
Contributor

Thanks much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty Series may change type from float64 to object
3 participants