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
http://stackoverflow.com/questions/24553921/pandas-matching-on-level-of-hierarchical-index/24554350#24554350
This should align on the columns axis. Not clear how to specify the alignment level though (e.g. broadcasting would be tricky here).
import numpy as np import pandas as pd arrays = [np.hstack([ ['one']*3, ['two']*3]), ['Dog', 'Bird', 'Cat']*2] columns = pd.MultiIndex.from_arrays(arrays, names=['foo', 'bar']) df = pd.DataFrame(np.zeros((3,6)),columns=columns, index=pd.date_range('20000103',periods=3)) df['one'] = pd.DataFrame({'Bird' : np.ones(3)*2, 'Dog' : np.ones(3), 'Cat' : np.ones(3)*3}, index= pd.date_range('20000103',periods=3)) df['two'] = pd.DataFrame({'Dog' : np.ones(3)*4, 'Bird' : np.ones(3)*5, 'Cat' : np.ones(3)*6,}, index= pd.date_range('20000103',periods=3))
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
http://stackoverflow.com/questions/24553921/pandas-matching-on-level-of-hierarchical-index/24554350#24554350
This should align on the columns axis. Not clear how to specify the alignment level though (e.g. broadcasting would be tricky here).
The text was updated successfully, but these errors were encountered: