text_html_output_1.png
import pandas as pd

sku_category_filepath = '../input/sku-category/sku_category.csv'
sku_category = pd.read_csv(sku_category_filepath, sep=None, decimal=',', engine='python')
sku_category.drop('compare', axis=1, inplace=True)
sku_category.drop('sector', axis=1, inplace=True)
sku = sku_category.copy()
for i in range(1, 32):
    if i < 10:
        date = '2017-03-0{}'.format(i)
    else:
        date = '2017-03-{}'.format(i)
    sku_price_filepath = '../input/sku-price/{}.csv'.format(date)
    sku_price = pd.read_csv(sku_price_filepath, sep=None, decimal=',', engine='python')
    sku_price.columns = ['sku', 'price-{}'.format(date)]
    sku_sold_filepath = '../input/sku-unitssold/{}.csv'.format(date)
    sku_sold = pd.read_csv(sku_sold_filepath, sep=None, decimal=',', engine='python')
    sku_sold.columns = ['sku', 'sold-{}'.format(date)]
    sku_price['sku'] = sku_price['sku'].astype(str)
    sku_price.drop(sku_price[sku_price['sku'] == 'S080501_500_30_EUR'].index.values, axis=0, inplace=True)
    sku_price.drop(sku_price[sku_price['sku'] == 'S080501_1500_30_EUR'].index.values, axis=0, inplace=True)
    sku_price['sku'] = pd.to_numeric(sku_price['sku'])
    sku_sold['sku'] = sku_sold['sku'].astype(str)
    sku_sold.drop(sku_sold[sku_sold['sku'] == 'S080501_500_30_EUR'].index.values, axis=0, inplace=True)
    sku_sold.drop(sku_sold[sku_sold['sku'] == 'S080501_1500_30_EUR'].index.values, axis=0, inplace=True)
    sku_sold['sku'] = pd.to_numeric(sku_sold['sku'])
    sku = pd.merge(sku, sku_price, on='sku', how='left')
    sku = pd.merge(sku, sku_sold, on='sku', how='left')

sku.sort_values(by='sold-2017-03-01').head(20)