数据分析汇总学习
https://blog.csdn.net/weixin_39778570/article/details/81157884
import pandas as pd
import numpy as np
from pandas import Series, DataFrame
# 打开csv文件
f = open('city_weather.csv')
df = pd.read_csv(f)
df
Out[12]:
date city temperature wind
0 03/01/2016 BJ 8 5
1 17/01/2016 BJ 12 2
2 31/01/2016 BJ 19 2
3 14/02/2016 BJ -3 3
4 28/02/2016 BJ 19 2
5 13/03/2016 BJ 5 3
6 27/03/2016 SH -4 4
7 10/04/2016 SH 19 3
8 24/04/2016 SH 20 3
9 08/05/2016 SH 17 3
10 22/05/2016 SH 4 2
11 05/06/2016 SH -10 4
12 19/06/2016 SH 0 5
13 03/07/2016 SH -