In [23]:
import pandas as pd
In [31]:
dir_ship_info = "./dataset/shop_info.txt"
dir_user_pay = "./dataset/user_pay.txt"
dir_user_view = "./dataset/user_view.txt"
shop_info = pd.read_csv(dir_ship_info, sep=',', names=["shop_id","city_name","location_id","per_pay","score","comment_cnt","shop_level","cate_1_name","cate_2_name","cate_3_name"])
user_pay = pd.read_csv(dir_user_pay, sep=",", names=["user_id","shop_id","time_stamp"])
user_view = pd.read_csv(dir_user_view, sep=",", names=["user_id","shop_id","time_stamp"])
# dir_ouput= "./result.txt"
# output=pd.DataFrame()
# output.to_csv(dir_ouput, sep=",", names= ["shop_id","day1","..."])
In [25]:
shop_info.head()
Out[25]:
In [29]:
user_pay.head()
Out[29]:
In [27]:
user_view.head()
Out[27]:
In [ ]: