a guest Jan 24th, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. data = pd.read_excel('/datasets/seo_data.xlsx', sheet_name='traffic_data')
  3. subcategory_dict = pd.read_excel('/datasets/seo_data.xlsx', sheet_name='subcategory_ids')
  4. category_dict = pd.read_excel('/datasets/seo_data.xlsx', sheet_name='category_ids')
  5. data_subcategory = data.merge(subcategory_dict, on='subcategory_id', how='left')
  6. data_final = data_subcategory.merge(subcategory_dict, on='subcategory_id', how='left')
  7. print(data_final.head(10))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand