python北京房价预测_python数据分析——北京房价分析
数据集及源代码链接:https://github.com/roberpan/python/tree/master/test/dataanalyse/houseprice
一、统计北京各区二手房单价排名,并分析高端小区(排名前10/50/100的小区),各区占有量
# -*- coding: utf-8 -*-
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
data = pd.read_csv(data/anjuke.csv)
get_region = lambda x: x.split(-)[0]
address = data[Region].apply(get_region)
data[District] = address
data[Unit_price] = data[Price] / data[Size]
plt.figure(figsize=(12,8)) #设置画布大小
grid=plt.GridSpec(2,3) #划分画布,这样可以调节每个子图的大小
#绘制北京各行政区房价排名
fig1=plt.subplot(grid[0,0:3])
datagroup1 = data.groupby([District], as_index=False)
unit_price_mean=datagroup1.Unit_price.mea
数据集及源代码链接:https://github.com/roberpan/python/tree/master/test/dataanalyse/houseprice 一、统计北京各区二手房单价排名,并分析高端小区(排名前10/50/100的小区),各区占有量 # -*- coding: utf-8 -*- import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data = pd.read_csv(data/anjuke.csv) get_region = lambda x: x.split(-)[0] address = data[Region].apply(get_region) data[District] = address data[Unit_price] = data[Price] / data[Size] plt.figure(figsize=(12,8)) #设置画布大小 grid=plt.GridSpec(2,3) #划分画布,这样可以调节每个子图的大小 #绘制北京各行政区房价排名 fig1=plt.subplot(grid[0,0:3]) datagroup1 = data.groupby([District], as_index=False) unit_price_mean=datagroup1.Unit_price.mea下一篇:
单片机位寻址举例_单片机的寻址方式