I am trying to replicate a bar chart using pandas. The problem I have run into is the merged cells. Pandas data frame returns unamed for the extra column. I have tried to select my excel data using read_excel() and then creating a dataframe for it using multiindexing methods but I cannot figure it out.
Can someone tell me how I can create/load similar data into a pd Dataframe.
Thank you!
EDIT: I had only been able to get to this point:
xls_file = pd.read_excel('MarkRuiz_COT1.xlsx',
sheet_name='Split8',usecols=[1,2,3,4,5,6,7,8,9,10,11,12])
xx = xls_file[1:]
Using jupyter notebook to display xx gives me
which is a (4,12) when running xx.shape. Next, what I did is try to create a multi index data frame of same size of load myt data but I did not index it correctly :/
outside = s7+s8
inside = nodes*2
pos = ['T01','T10']*6
hier_index = list(zip(outside,inside))
hier_index = pd.MultiIndex.from_tuples(hier_index)
df = pd.DataFrame(xx,index=hier_index,columns=pos)
df


