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
Per Chris Billington on pystatsmodels
In [8]: df Out[8]: a b c routine1 routine2 top result1 result2 result1 OD wx wy 0 -0.914239 -0.230830 -0.421134 0.131751 -0.902347 0.382893 0.334615 0.909842 1 -0.533285 -0.878316 -3.046224 -0.760047 0.299502 -0.268321 -0.709366 -0.878868 2 0.804353 -1.203268 -1.221442 -1.948503 0.156240 -0.439375 -0.921254 1.119102 In [9]: df2 = df.set_index([('a','','')]) In [10]: df2 Out[10]: <class 'pandas.core.frame.DataFrame'> Index: 3 entries, -0.914238702285 to 0.804353019197 Data columns: ('b', '', '') 3 non-null values ('c', '', '') 3 non-null values ('routine1', 'result1', '') 3 non-null values ('routine1', 'result2', '') 3 non-null values ('routine2', 'result1', '') 3 non-null values ('top', 'OD', 'wx') 3 non-null values ('top', 'OD', 'wy') 3 non-null values dtypes: float64(7) In [11]: df2.columns Out[11]: Index([('b', '', ''), ('c', '', ''), ('routine1', 'result1', ''), ('routine1', 'result2', ''), ('routine2', 'result1', ''), ('top', 'OD', 'wx'), ('top', 'OD', 'wy')], dtype=object)
The text was updated successfully, but these errors were encountered:
Code to construct df:
arrays = [[ 'a', 'b', 'c', 'top', 'top', 'routine1', 'routine1', 'routine2'], [ '', '', '', 'OD', 'OD', 'result1', 'result2', 'result1'], [ '', '', '', 'wx', 'wy', '', '', '']] tuples = zip(*arrays) tuples.sort() index = MultiIndex.from_tuples(tuples) df = DataFrame(randn(3,8), columns=index)
Sorry, something went wrong.
f86c3be
Merge pull request pandas-dev#764 from shashank88/1.78release
7e3793f
Release 1.78 and tick over the next version to 1.79
No branches or pull requests
Per Chris Billington on pystatsmodels
The text was updated successfully, but these errors were encountered: