Top "Multi-index" questions

A multi-index (also known as a hierarchical index) allows the manipulation of higher-dimensional data in a 2-dimensional tabular structure.

create multiindex from dataframe pandas

I'm trying to create the multi-index dataframe from following dataframe: date_time session 2015-07-30 10:32:54.000 1 2015-07-30 10:32:54.000 1 2015-07-30 10:36:39.000 1 2015-07…

python pandas dataframe multi-index
a C++ hash map that preserves the order of insertion

I have the following code: #include <iostream> #include "boost/unordered_map.hpp" using namespace std; using namespace boost; …

c++ unordered-map html-lists multi-index
Merge two MultiIndex levels into one in Pandas

I have a Pandas data frame which is MultiIndexed. The second level contains a year ([2014,2015]) and the third contains the …

python pandas multi-index
Filling in date gaps in MultiIndex Pandas Dataframe

I would like to modify a pandas MultiIndex DataFrame such that each index group includes Dates between a specified range. …

python pandas numpy dataframe multi-index
Setting DataFrame column headers to a MultiIndex

How do I convert an existing dataframe with single-level columns to have hierarchical index columns (MultiIndex)? Example dataframe: In [1]: import …

python pandas multi-index
Python Pandas slice multiindex by second level index (or any other level)

There are many postings on slicing the level[0] of a multiindex by a range of level1. However, I cannot find …

python sorting pandas slice multi-index
Python Pandas: How to set the name of multiindex?

I want to add the name of index of multi-index dataframe. I want to set the name of red box …

python pandas multi-index
How to slice one MultiIndex DataFrame with the MultiIndex of another

I have a pandas dataframe with 3 levels of a MultiIndex. I am trying to pull out rows of this dataframe …

python pandas dataframe multi-index
pandas: convert index type in multiindex dataframe

Hi have a multiindex dataframe: tuples = [('YTA_Q3', 1), ('YTA_Q3', 2), ('YTA_Q3', 3), ('YTA_Q3', 4), ('YTA_Q3…

python pandas types multi-index
What is the meaning of the error cannot handle a non-unique multi index in groupby clause?

I have a dataframe which have three level of index, and I wish to calculate how much a value deviates …

python pandas unique pandas-groupby multi-index