code: def normalize_etpinard_df(df='https://plot.ly/~etpinard/191.csv', columns='x y size text'.split(),
                            category_col='category', possible_categories=['Africa', 'Americas', 'Asia', 'Europe', 'Oceania']):
      
      possible_categories = ['Africa', 'Americas', 'Asia', 'Europe',
                             'Oceania'] if possible_categories is None else possible_categories
      df.columns = clean_columns(df.columns)
      df = pd.read_csv(df) if isinstance(df, str) else df
      columns = clean_columns(list(columns))
      df2 = pd.DataFrame(columns=columns)
      df2[category_col] = np.concatenate([np.array([categ] * len(df)) for categ in possible_categories])
      columns = zip(columns, [[clean_columns(categ + ', ' + column) for categ in possible_categories] for column in columns])
      for col, category_cols in columns:
          df2[col] = np.concatenate([df[label].values for label in category_cols])
      return df2
docs: Reformat a dataframe in etpinard's format for use in plot functions and sklearn models