Nhập dữ liệu nâng cao trong Python
Hugo Bowne-Anderson
Data Scientist at DataCamp
Tệp phẳng như .txt và .csv
Tệp pickled, bảng tính Excel, và nhiều loại khác!
Dữ liệu từ cơ sở dữ liệu quan hệ
Bạn có thể làm tất cả điều này cục bộ
Nếu dữ liệu ở trực tuyến thì sao?

Nhập và lưu cục bộ các tập dữ liệu từ web
Nạp tập dữ liệu vào DataFrame của pandas
Thực hiện yêu cầu HTTP (GET)
Trích xuất dữ liệu web như HTML
Phân tích HTML thành dữ liệu hữu ích (BeautifulSoup)
Dùng gói urllib và requests
urlopen() - nhận URL thay cho tên tệpfrom urllib.request import urlretrieve
url = 'http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/
winequality-white.csv'
urlretrieve(url, 'winequality-white.csv')
('winequality-white.csv', <http.client.HTTPMessage at 0x103cf1128>)
Nhập dữ liệu nâng cao trong Python