code: def load_geo_adwords(filename='AdWords API Location Criteria 2017-06-26.csv.gz'):
      
      df = pd.read_csv(filename, header=0, index_col=0, low_memory=False)
      df.columns = [c.replace(' ', '_').lower() for c in df.columns]
      canonical = pd.DataFrame([list(row) for row in df.canonical_name.str.split(',').values])
  
      def cleaner(row):
          cleaned = pd.np.array(
              [s for i, s in enumerate(row.values) if s not in ('Downtown', None) and (i > 3 or row[i + 1] != s)])
          if len(cleaned) == 2:
              cleaned = [cleaned[0], None, cleaned[1], None, None]
          else:
              cleaned = list(cleaned) + [None] * (5 - len(cleaned))
          if not pd.np.all(pd.np.array(row.values)[:3] == pd.np.array(cleaned)[:3]):
              logger.info('{} => {}'.format(row.values, cleaned))
          return list(cleaned)
  
      cleancanon = canonical.apply(cleaner, axis=1)
      cleancanon.columns = 'city region country extra extra2'.split()
      df['region'] = cleancanon.region
      df['country'] = cleancanon.country
      return df
docs: WARN: Not a good source of city names. This table has many errors, even after cleaning