A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/6959 below:

Panel.shift does not respect dtypes 13.1 · Issue #6959 · pandas-dev/pandas · GitHub

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4