pivot table : flatten the key-value pair dataframe