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

REGR: fix period dtype <-> arrow roundtrip for pyarrow < 4 #45524

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

jorisvandenbossche
Copy link
Member

Closes #45470

@jorisvandenbossche jorisvandenbossche added Regression Functionality that used to work in a prior pandas version Compat pandas objects compatability with Numpy or Python functions IO Parquet parquet, feather Arrow pyarrow functionality labels Jan 21, 2022
@jorisvandenbossche jorisvandenbossche added this to the 1.4 milestone Jan 21, 2022
@@ -51,6 +52,12 @@ def make_block(

values, dtype = extract_pandas_array(values, dtype, ndim)

if klass is ExtensionBlock and is_period_dtype(values.dtype):
Copy link
Contributor

Choose a reason for hiding this comment

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

defer to @jbrockmendel but not sure this is the right place for this

Copy link
Member

Choose a reason for hiding this comment

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

this is fine.

issue a deprecation warning?

Copy link
Member Author

Choose a reason for hiding this comment

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

issue a deprecation warning?

For the case we know about (pyarrow), this is already fixed in the latest release. For in general, we might want to raise a warning for any time that klass is specified? So that it always will be inferred from the values (which pyarrow already does by now), and we don't have this issue again when changing Block classes.

Giving the timing of the release, I think we can discuss that in a follow up

@simonjayhawkins
Copy link
Member

Is this ready? can we merge and get this backported or move to 1.4.1 before tomorrow morning since if still open and on the 1.4 milestone tomorrow I will not start the release.

@jreback jreback merged commit f244ee9 into pandas-dev:main Jan 21, 2022
@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

@meeseeksdev backport 1.4.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 21, 2022

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

jreback pushed a commit that referenced this pull request Jan 22, 2022
…arrow < 4 (#45541)

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
@jorisvandenbossche jorisvandenbossche deleted the regr-pyarrow-period branch January 22, 2022 09:09
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Compat pandas objects compatability with Numpy or Python functions IO Parquet parquet, feather Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REGR: roundtrip pandas<->pyarrow conversion for Period dtype broken for older pyarrow versions
4 participants