Vẽ biểu đồ tần suất (histogram)

Nhập môn Khoa học Dữ liệu với Python

Hillary Green-Lerman

Lead Data Scientist, Looker

Lần theo kẻ bắt cóc

Nhập môn Khoa học Dữ liệu với Python

Histogram là gì?

Nhập môn Khoa học Dữ liệu với Python

Histogram với matplotlib

plt.hist(gravel.mass)

plt.show()

Nhập môn Khoa học Dữ liệu với Python

Thay đổi số bin

plt.hist(data, bins=nbins)
plt.hist(gravel.mass, bins=40)

Nhập môn Khoa học Dữ liệu với Python

Thay đổi khoảng giá trị

plt.hist(data,
         range=(xmin, xmax))
plt.hist(gravel.mass,
         range=(50, 100))

Nhập môn Khoa học Dữ liệu với Python

Chuẩn hóa

Biểu đồ cột chưa chuẩn hóa

plt.hist(male_weight)
plt.hist(female_weight)

Tổng diện tích cột = 1

plt.hist(male_weight, density=True)
plt.hist(female_weight, density=True)

Nhập môn Khoa học Dữ liệu với Python

Ayo berlatih!

Nhập môn Khoa học Dữ liệu với Python

Preparing Video For Download...