pandas로 마케팅 캠페인 분석하기
Jill Rosok
Data Scientist
# 날짜별 광고 노출 고유 사용자 집계
daily_users = marketing.groupby(['date_served'])\
['user_id'].nunique()
print(daily_users)
date_served
2018-01-01 362
2018-01-02 374
2018-01-03 348
...
Name: user_id, dtype: int64
import matplotlib.pyplot as plt
# 그리기
daily_users.plot()
# 주석
dplt.title('광고 노출 일일 사용자 수')
plt.xlabel('날짜')
plt.ylabel('사용자 수')
plt.xticks(rotation = 45)
plt.show()

pandas로 마케팅 캠페인 분석하기