create_training_set執行加入。這隻是一個簡單的函數,從火花SQL數據庫選擇數據存儲所使用的特性。您可以編寫自己的代碼內連接:
customer_features_df =火花。sql (“SELECT * FROM recommender_system.customer_features”) product_features_df =火花。sql training_df (“SELECT * FROM recommender_system.product_features”)。加入(customer_features_df = [training_df。cid = = customer_features_df。customer_id training_df。transaction_dt = = customer_features_df。dt], = "內部")。加入(product_features_df = " product_id”,如何=“內在”)
create_training_set執行加入。這隻是一個簡單的函數,從火花SQL數據庫選擇數據存儲所使用的特性。您可以編寫自己的代碼內連接:
customer_features_df =火花。sql (“SELECT * FROM recommender_system.customer_features”) product_features_df =火花。sql training_df (“SELECT * FROM recommender_system.product_features”)。加入(customer_features_df = [training_df。cid = = customer_features_df。customer_id training_df。transaction_dt = = customer_features_df。dt], = "內部")。加入(product_features_df = " product_id”,如何=“內在”)