Python 視覺化怎麼做

給試算表使用者的 Python

Chris Cardillo

Data Scientist

再匯入幾個套件

import seaborn as sns
import matplotlib.pyplot as plt
給試算表使用者的 Python

繪圖函式

  • sns.barplot() - 建立長條圖
  • plt.show() - 顯示長條圖
給試算表使用者的 Python

試算表圖表

試算表圖表

給試算表使用者的 Python

Python 圖表

Python 圖表(Jupyter Notebook)

給試算表使用者的 Python

sns.barplot()

sns.barplot(x='store', y='revenue', data=totals)
給試算表使用者的 Python

plt.show()

sns.barplot(x='store', y='revenue', data=totals)

plt.show()

僅顯示圖表

給試算表使用者的 Python

plt.savefig()

sns.barplot(x='store', y='revenue', data=totals)

plt.savefig('awesome_plot.png')
給試算表使用者的 Python

換你試試!

給試算表使用者的 Python

Preparing Video For Download...