-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Description
import pandas as pd
from StringIO import StringIO
txt = """time,id,value
2012-10-20,1,1.5
2012-10-20,1,2.5
2012-10-21,1,1.5
"""
xxx = pd.read_csv(StringIO(txt), parse_dates=0)
print(xxx.set_index(["time"])[xxx.id == 1])
print(xxx.set_index(["time", "id"]).to_panel().value)
It prints out:
id value
time
2012-10-20 1 1.5
2012-10-20 1 2.5
2012-10-21 1 1.5
id 1
time
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