PivotPivotpd.pivot(data = df, index = 'colName', columns = 'colName2', values = 'colName3') # index and columns should have repeated values in orignal dataframe # each new column will return the values # for each conbination of index and column values