การสร้าง Line Plot

Python เบื้องต้นสำหรับ Data Science

Hillary Green-Lerman

Lead Data Scientist, Looker

เรื่องราวซับซ้อนขึ้น

Python เบื้องต้นสำหรับ Data Science

จาก DataFrame สู่การแสดงผล

Python เบื้องต้นสำหรับ Data Science

แนะนำ Matplotlib

from matplotlib import pyplot as plt
plt.plot(x_values, y_values)

plt.show()

Python เบื้องต้นสำหรับ Data Science

Line Plot

Python เบื้องต้นสำหรับ Data Science

การแสดงผลลัพธ์

plt.show()

การแสดงผลกราฟด้วยฟังก์ชัน plt.show()

Python เบื้องต้นสำหรับ Data Science

หลายเส้นในกราฟเดียว

plt.plot(data1.x_values,
         data1.y_values)
plt.plot(data2.x_values,
         data2.y_values)
plt.show()

Python เบื้องต้นสำหรับ Data Science

มาฝึกกันเถอะ!

Python เบื้องต้นสำหรับ Data Science

Preparing Video For Download...