Python编程从入门到实践,第16章,下载数据
import csv
from datetime import datetime
from matplotlib import pyplot as plt
从文件中获取日期和最高气温
filename = ‘sitka_weather_07-2014.csv’
with open(filename) as f:
reader = csv.reader(f)
header_row = next(reader)
dates,highs = [],[]