Skip to content

COMPAT: concat of PeriodIndex #13221

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
max-sixty opened this issue May 18, 2016 · 5 comments
Closed

COMPAT: concat of PeriodIndex #13221

max-sixty opened this issue May 18, 2016 · 5 comments
Labels
Compat pandas objects compatability with Numpy or Python functions Period Period data type Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Milestone

Comments

@max-sixty
Copy link
Contributor

https://github.com/pydata/pandas/blob/master/pandas/tseries/period.py#L920
return Index(com._concat_compat(to_concat), name=name)
now should reference pandas.types.concat._concat_compat

I think this should probably fail - concat-ing a PeriodIndex with other index types?

@jreback
Copy link
Contributor

jreback commented May 18, 2016

this ultimately calls conat_datetime, yes which should handle PeriodIndex, but doesn't ATM (well it DOES because they are treated as object), so strictly speaking this works.

cc @sinhrks

@jreback jreback changed the title BUG: com._concat_compat reference COMPAT: concat of PeriodIndex May 18, 2016
@jreback jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Period Period data type Compat pandas objects compatability with Numpy or Python functions labels May 18, 2016
@jreback jreback added this to the 0.19.0 milestone May 18, 2016
@jreback
Copy link
Contributor

jreback commented May 18, 2016

this is something @sinhrks will handle when period is a real-dtype

@max-sixty
Copy link
Contributor Author

Two separate issues

  • A code breakage, because it's calling com._concat_compat which doesn't exist anymore
  • Whether this should / does work in a conceptual sense

Not sure if you recognized the first issue here?

@jreback
Copy link
Contributor

jreback commented May 18, 2016

oh, that must not be tested :)

that has moved locations (though it may be aliased)

@jreback jreback modified the milestones: 0.18.2, 0.19.0 May 18, 2016
@jreback jreback modified the milestones: 0.19.0, Next Major Release Sep 28, 2016
@TomAugspurger
Copy link
Contributor

I think this is resolved.

concat([Period]) is a period type. concat([period, other]) is object.

@TomAugspurger TomAugspurger modified the milestones: Contributions Welcome, No action Oct 25, 2018
@jorisvandenbossche jorisvandenbossche modified the milestones: No action, 0.24.0 Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Period Period data type Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

4 participants