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/4618 below:

shift() on Series of dtype bool makes dtype into object, so HDFStore won't append · Issue #4618 · pandas-dev/pandas · GitHub

import pandas as pd

# '0.11.0'
print pd.__version__

df = pd.DataFrame(index=range(0,5), columns=['mybool'])
df.mybool = False
store = pd.HDFStore('shiftedbool.h5')

# this works
store.append('noshiftedbool', df)

# now add a shifted bool, backfilled
df['shiftedbool'] = df.mybool.shift(1).fillna(method='bfill')
print df

# causes exception:
store.append('shiftedbool', df)

This can be worked around; for now I'm using 0.0 and 1.0. But this seems like an issue that could be improved.

My first issue submitted; I hope it's up to scratch


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