Category "multi-index"

Converting a pandas dataframe to multi-index and changing values

I have the following dataframe: d = [{'AX':['Rec=1','POSi=2'], 'AVF1':[], 'HI':['Rec=343', 'POSi=4'], 'version_1':[]}, {'AX':[], 'AVF1':['Rec=4', 'POSi=454'],

pd.read_csv - dates in pandas multiindex column names

I import a csv file into a pandas dataframe. df=pd.read_csv('data.csv',index_col=[0],header=[0,1]) My data has a column multiindex with two levels. Level(0) co

Sort dataframe multiindex level and by column

#Updated: pandas version 0.23.0 solves this problem with Sorting by a combination of columns and index levels I have struggled with this and I suspect there is

Set MultiIndex of an existing DataFrame in pandas

I have a DataFrame that looks like Emp1 Empl2 date Company 0 0 0 2012-05-01 apple 1 0 1 2012-05-29