การสร้างภาพข้อมูลใน Python ทำงานอย่างไร

Python สำหรับผู้ใช้สเปรดชีต

Chris Cardillo

Data Scientist

นำเข้าแพ็กเกจเพิ่มเติม

import seaborn as sns
import matplotlib.pyplot as plt
Python สำหรับผู้ใช้สเปรดชีต

ฟังก์ชันสำหรับพล็อตกราฟ

  • sns.barplot() - สร้างกราฟแท่ง
  • plt.show() - แสดงกราฟแท่ง
Python สำหรับผู้ใช้สเปรดชีต

กราฟใน Spreadsheet

กราฟใน spreadsheet

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...