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

Corrupted values in Panel when index is not unique #2441

rafaljozefowicz opened this issue Dec 6, 2012 · 0 comments


Copy link

commented Dec 6, 2012

import pandas as pd
from StringIO import StringIO
txt = """time,id,value
xxx = pd.read_csv(StringIO(txt), parse_dates=0)
print(xxx.set_index(["time"])[ == 1])
print(xxx.set_index(["time", "id"]).to_panel().value)

It prints out:
id value
2012-10-20 1 1.5
2012-10-20 1 2.5
2012-10-21 1 1.5

id 1
2012-10-20 1.5
2012-10-21 2.5

The value for panel on 2012-10-21 is incorrect.

I am using pandas 0.9.0

@ghost ghost assigned wesm Dec 7, 2012

@wesm wesm closed this in 24133e8 Dec 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.