視覺化每日行銷觸及
在上一個練習中,你建立了 daily_users DataFrame,裡面包含每天訂閱的使用者數量。這是很好的第一步,但只看表格不容易解讀每日趨勢。為了讓你與商業利害關係人更容易察覺訂閱走勢,接下來你會用折線圖把結果視覺化。
本練習屬於課程
使用 pandas 分析行銷活動
練習說明
- 使用
.plot()方法視覺化date_served的結果。 - 加上標題 『Daily users』 與 y 軸標籤 『Number of users』。
- 將 x 軸標籤旋轉 45 度。
- 顯示圖表。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Plot daily_users
daily_users.____
# Include a title and y-axis label
plt.____('____')
plt.____('____')
# Rotate the x-axis labels by 45 degrees
plt.____(____)
# Display the plot
plt.____()