Skip to content

Panel.shift does not respect dtypes 13.1 #6959

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
dalejung opened this issue Apr 25, 2014 · 0 comments · Fixed by #6974
Closed

Panel.shift does not respect dtypes 13.1 #6959

dalejung opened this issue Apr 25, 2014 · 0 comments · Fixed by #6974
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Milestone

Comments

@dalejung
Copy link
Contributor

Because the 13.1 shift uses .values, it will upcast mixed dtypes to object.

import pandas as pd
import numpy as np
import pandas.util.testing as tm


data = [('item '+ch, tm.makeMixedDataFrame()) for ch in list('abcde')]
data = dict(data)
mixed_panel = pd.Panel.from_dict(data, orient='minor')
shifted = mixed_panel.shift(1)
tm.assert_series_equal(mixed_panel.dtypes, shifted.dtypes) #fails

Have PR for this.

@jreback jreback added this to the 0.14.0 milestone Apr 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants