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

BUG: Pass copy argument to expanddim constructor in concat. #42823

Merged
merged 6 commits into from
Aug 11, 2021

Conversation

jmcomie
Copy link
Contributor

@jmcomie jmcomie commented Jul 30, 2021

Pass the provided copy argument through to the DataFrame constructor when constructing a DataFrame from a Series iterable, as is done with the other DataFrame construction call in the get_result method.

The new test in frame/methods/test_astype.py is as provided by the author of the issue with minor changes.

@TomAugspurger this updates your test extension/decimal/test_decimal.py:test_astype_dispatches to expect both frame and series astype calls to retain the context.prec value. The prior failure was caused by the copying of the DataFrame, and that copy no longer occurs. The underlying issue with copy and the dtype is unaddressed here.

@jmcomie
Copy link
Contributor Author

jmcomie commented Jul 30, 2021

The one test failure in pandas/tests/resample/test_resample_api.py::test_agg appears to be occurring in other PR test runs and unrelated.

@simonjayhawkins simonjayhawkins added Copy / view semantics ExtensionArray Extending pandas with custom dtypes or arrays. labels Aug 3, 2021
@simonjayhawkins simonjayhawkins added this to the 1.3.2 milestone Aug 3, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

can you also add a note in 1.3.2. you can add to bug fix section is fine.

pandas/tests/frame/methods/test_astype.py Outdated Show resolved Hide resolved
@jreback
Copy link
Contributor

jreback commented Aug 4, 2021

ping when ready for merge

@jmcomie jmcomie requested a review from jreback August 6, 2021 12:23
pandas/tests/frame/methods/test_astype.py Outdated Show resolved Hide resolved
pandas/tests/frame/methods/test_astype.py Outdated Show resolved Hide resolved
Co-authored-by: Simon Hawkins <simonjayhawkins@gmail.com>
@jreback
Copy link
Contributor

jreback commented Aug 10, 2021

status here?

@jmcomie
Copy link
Contributor Author

jmcomie commented Aug 10, 2021

status here?

Just about there. Can you look at the questions above in the review?

@jreback
Copy link
Contributor

jreback commented Aug 10, 2021

status here?

Just about there. Can you look at the questions above in the review?

answered! pls merge master as well and ping on green.

@jmcomie jmcomie requested a review from jreback August 11, 2021 06:43
@jreback jreback merged commit 965d289 into pandas-dev:master Aug 11, 2021
@jreback
Copy link
Contributor

jreback commented Aug 11, 2021

thanks @jmcomie

@jreback
Copy link
Contributor

jreback commented Aug 11, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Aug 11, 2021

Something went wrong ... Please have a look at my logs.

jreback pushed a commit that referenced this pull request Aug 11, 2021
…in concat. (#42984)

Co-authored-by: Justin McOmie <justin.mcomie@gmail.com>
@jmcomie
Copy link
Contributor Author

jmcomie commented Aug 12, 2021

thanks @jmcomie

thanks for helping with the PR. I'm happy to contribute

feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Copy / view semantics ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: extraneous copy of extension arrays in v1.3.0
3 participants