We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
The text was updated successfully, but these errors were encountered:
24133e8
wesm
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: