Nhập môn Khoa học Dữ liệu với Python
Hillary Green-Lerman
Lead Data Scientist, Looker

import pandas as pd
from matplotlib import pyplot as plt
df = pd.read_csv('letter_frequency.csv')
plt.plot(df.letter_index, df.frequency, label='Ransom')
plt.show()
Hàm thực hiện hành động:
pd.read_csv() chuyển tệp csv thành bảng trong Pythonplt.plot() chuyển dữ liệu thành biểu đồ đườngplt.show() hiển thị biểu đồ trong cửa sổ mới


Tên hàm:
plt)plot)()
Đối số vị trí:

Đối số từ khóa:
label), rồi dấu bằng (=)Ransom)

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