I grouped my dataframe by the two columns below
df = pd.DataFrame({\'a\': [1, 1, 3], \'b\': [4.0, 5.5, 6.0], \'c\': [7L, 8L
Set as_index = False during groupby
as_index = False
df = pandas.DataFrame({"a":[1,1,3], "b":[4,5.5,6], "c":[7,8,9], "name":["hello","hello","foo"]}) df.groupby(["a", "name"] , as_index = False).median()