code: def reshape_line_plot(df, x, y):
      
      idx = list(df.columns.drop(y))
      if df.duplicated(idx).any():
          warnings.warn('Duplicated index found.')
          df = df.drop_duplicates(idx, keep='last')
      df = df.set_index(idx)[y].unstack(x).T
      return df
docs: Reshape data from long form to "line plot form".
  
      Line plot form has x value as the index with one column for each line.
      Each column has data points as values and all metadata as column headers.