Data silahkan download di sini ya:
https://www.kaggle.com/samipjshah/wa-sales-products-201214
tonton videonya di link ini: https://youtu.be/g7LNO3Gcgko
Berikut code untuk import datanya dulu
names = ['Country','Order','Retailer','Product_line','Item','Product','Year','Quarter','Revenue','Sold','Cost','margin','Profit']
import dulu pandas dataframe ya
import pandas as pd
sales = pd.read_csv('WA_Sales_Products_2012-14_Updated.csv', sep=',', names=names, low_memory=False)
ambil revenue tiap quarter nya
q1a = sales[sales.Quarter == 'Q1 2012'].Revenue q2a = sales[sales.Quarter == 'Q2 2012'].Revenue q3a = sales[sales.Quarter == 'Q3 2012'].Revenue(more…)