การพยากรณ์ CTR ด้วย Machine Learning ใน Python
Kevin Huo
Instructor



.isin(): df.columns.isin(['device'])]y คือคอลัมน์ของการคลิก สามารถคำนวณ CTR ได้ด้วย: y.sum()/len(y)print(df.device_type.value_counts())
1 45902
0 2947
print(df.groupby('device_type')['click'].sum())
0 633
1 7890
การพยากรณ์ CTR ด้วย Machine Learning ใน Python