import pandas as pdimport numpy as npdf=pd.read_csv('C:/Users/15451/data/1.csv')dfdf.info()df[df.价格<1000]df[(df.价格<1200)&(df.出发地=='成都')]df[df.价格.between(1000,2000)].sort_values(by='价格')df.groupby('出发地')['路线名'].size()df.groupby('出发地')['价格'].agg([np.size,np.mean])df.groupby(by=['出发地','目的地'])['价格'].agg([np.size,np.mean])df.pivot_table(values=['价格'],index=['出发地'],columns=['目的地'],aggfunc=[np.size,np.mean])df.head(2)df['价格'].corr(df['星级'])
1500字范文,内容丰富有趣,写作好帮手!