Python実践データ分析100本ノックを読む

ノック1 データを読み込んでみよう

f:id:bitop:20191019075332p:plain

ノック2 データを結合してみよう

f:id:bitop:20191019084900p:plain
このときconcatに引数としてignore_indexをTrueにしているが
これはindexを振りなすよう指示している

transactionテーブルのカラム
transaction_id 取引ごとのid
price 取引金額
payment_date 支払い月日
customer_id 顧客id

transaction_detailテーブルのカラム
detail_id 取引詳細id
transaction_id 取引id
item_id 商品id
quantity 取引量

item_masterテーブルのカラム
item_id 商品id
item_name 商品名
item_price 商品単価

customer_masterテーブル
customer_id 顧客id
customer_name 顧客名
registration_date 登録日
customer_name_kana 顧客名カナ
email メールアドレス
gender 性別
age 年齢
birth 生年月日
pref 都道府県名

ノック3 売上データ同士を結合してみよう

結合する前のtransaction_detailテーブル  
f:id:bitop:20191019101448p:plain
結合した後ののtransaction_detailテーブル  
f:id:bitop:20191019101537p:plain