Youtube Video commentary is also available.
P-002: Specify columns in the order of sales date (sales_ymd), customer ID (customer_id), product code (product_cd), and sales amount (amount) from the receipt statement data frame (df_receipt), and display 10 items.
code
df_receipt[['sales_ymd', 'customer_id', 'product_cd', 'amount']].head(10)
output
sales_ymd customer_id product_cd amount
0 20181103 CS006214000001 P070305012 158
1 20181118 CS008415000097 P070701017 81
2 20170712 CS028414000014 P060101005 170
3 20190205 ZZ000000000000 P050301001 25
4 20180821 CS025415000050 P060102007 90
5 20190605 CS003515000195 P050102002 138
6 20181205 CS024514000042 P080101005 30
7 20190922 CS040415000178 P070501004 128
8 20170504 ZZ000000000000 P071302010 770
9 20191010 CS027514000015 P071101003 680
** ・ It is a method to check the first data by specifying a column in Pandas DataFrame / Series.
-Use this when you want to narrow down the column information and check it roughly.
-In' [[
Recommended Posts