Skip to content

Added dtype test concat function #44927

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
wants to merge 3 commits into from

Conversation

GustavoGB
Copy link

@pep8speaks
Copy link

pep8speaks commented Dec 16, 2021

Hello @GustavoGB! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-12-16 19:37:58 UTC

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

I think test_datetimes would be a better place for this test?



def test_concat_float_datetime():

Copy link
Member

Choose a reason for hiding this comment

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

Please add gh reference at the top, like GH#issue_number

df_time = pd.DataFrame({"A": pd.array(["2000"], dtype="datetime64[ns]")})
df_float = pd.DataFrame({"A": pd.array([1.0], dtype="float64")})

assert pd.concat([df_time.iloc[:0], df_float.iloc[:0]])["A"].dtype == object
Copy link
Member

Choose a reason for hiding this comment

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

Could you please check the whole DataFrame?

@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Dec 16, 2021
df_time = pd.DataFrame({"A": pd.array(["2000"], dtype="datetime64[ns]")})
df_float = pd.DataFrame({"A": pd.array([1.0], dtype="float64")})

assert pd.concat([df_time, df_float])["A"].dtype == object
Copy link
Member

Choose a reason for hiding this comment

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

Please test the whole DataFrame not only the dtype

@jreback jreback added the Testing pandas testing functions or related to the test suite label Dec 17, 2021
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Feb 13, 2022
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in main, address the comments and we can reopen

@mroeschke mroeschke closed this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode Stale Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect dtype for concat with empty float and datetime columns
5 participants