当前位置: 首页 > news >正文

酒店网站建设便宜公众号代运营

酒店网站建设便宜,公众号代运营,高端建设网站公司,家政服务公司网站建设方案策划书文章目录 🏳️‍🌈 1. 导入模块🏳️‍🌈 2. Pandas数据处理2.1 读取数据2.2 过滤数据2.3 行政区处理2.4 地址处理2.5 房屋信息处理2.6 面积处理2.7 楼层处理2.8 年份处理2.9 房价处理2.10 删除不用的列2.11 数据类型转换2.12 查看…

文章目录

  • 🏳️‍🌈 1. 导入模块
  • 🏳️‍🌈 2. Pandas数据处理
    • 2.1 读取数据
    • 2.2 过滤数据
    • 2.3 行政区处理
    • 2.4 地址处理
    • 2.5 房屋信息处理
    • 2.6 面积处理
    • 2.7 楼层处理
    • 2.8 年份处理
    • 2.9 房价处理
    • 2.10 删除不用的列
    • 2.11 数据类型转换
    • 2.12 查看数据信息
  • 🏳️‍🌈 3. Pyecharts数据可视化
    • 3.1 各行政区二手房数量地图
    • 3.2 各行政区二手房数量柱状图
    • 3.3 各行政区二手房均价地图
    • 3.4 户型占比分布
    • 3.5 楼层数量分布
    • 3.6 朝向数量分布
    • 3.7 面积-总价分布
    • 3.8 建设年份分布
    • 3.9 小区房价词云
  • 🏳️‍🌈 4. 可视化项目源码+数据

大家好,我是 👉【Python当打之年(点击跳转)】

本期利用 python 分析一下「杭州二手房数据」 ,看看杭州市各区二手房数量、二手房价格分布、户型分布、年份分布、小区分布 等,希望对大家有所帮助,如有疑问或者需要改进的地方可以联系小编。

涉及到的库:

  • Pandas — 数据处理
  • Pyecharts — 数据可视化

🏳️‍🌈 1. 导入模块

import pandas as pd
from pyecharts.charts import *
from pyecharts import options as opts
import warnings
warnings.filterwarnings('ignore')

🏳️‍🌈 2. Pandas数据处理

2.1 读取数据

df = pd.read_excel("./二手房数据.xlsx")

2.2 过滤数据

df1 = df.copy()

2.3 行政区处理

names = ['拱墅', '西湖', '滨江', '上城', '临平', '余杭', '萧山', '富阳', '桐庐', '临安', '淳安','建德', '钱塘']

2.4 地址处理

df1['小区'] = df1['地址'].str.split(' ', n=2 ,expand=True)[1]

2.5 房屋信息处理

df1['房屋信息'].str.split('|',expand=True)

2.6 面积处理

df1['面积(㎡)'] = df1['面积'].apply(lambda x: re.findall(r'\d+', x))

2.7 楼层处理

df1['楼层'] = df1['楼层'].apply(lambda x: re.findall(r'\d+', x))

2.8 年份处理

df1['年份'] = df1['年份'].apply(lambda x: re.findall(r'\d+', x))

2.9 房价处理

df1['总价(万)'] = df1['房价'].apply(lambda x: re.findall(r'\d+', x))

2.10 删除不用的列

df1 = df1.drop(['房屋信息','房价','联系人','面积', '地址','地铁'])

2.11 数据类型转换

for col in ['楼层','年份', '卧室', '客厅', '面积(㎡)','总价(万)','单价(元/㎡)']:df1[col] = df1[col].astype('int')

2.12 查看数据信息

df1.info()

🏳️‍🌈 3. Pyecharts数据可视化

3.1 各行政区二手房数量地图

def get_chart():chart = (Map().add("",[list(z) for z in zip(x_data, y_data)],"杭州",).set_global_opts(title_opts=opts.TitleOpts(title="1-各行政区二手房数量地图",subtitle=subtitle,pos_top="2%",pos_left="center",),visualmap_opts=opts.VisualMapOpts(pos_left='3%',)))

在这里插入图片描述

  • 萧山区、拱墅区、西湖区、上城区、临安区的二手房数量要高于其他城区。
  • 东部二手房数量高于西部地区。

3.2 各行政区二手房数量柱状图

def get_chart2():chart = (Bar().add_xaxis(x_data).add_yaxis("", y_data).set_global_opts(title_opts=opts.TitleOpts(title="2-各行政区二手房数量",pos_top='2%',pos_left="center",),visualmap_opts=opts.VisualMapOpts(is_show=False),))return chart

在这里插入图片描述

3.3 各行政区二手房均价地图

在这里插入图片描述

  • 上城区、滨江区二手房均价在600万以上,富阳区、淳安县、拱墅区均价在500万以上。

3.4 户型占比分布

def get_chart():chart = (Pie().add("",sorted_by_value,).set_global_opts(title_opts=opts.TitleOpts(title="4-户型占比分布",pos_top='2%',pos_left="center",),visualmap_opts=opts.VisualMapOpts(is_show=False,),).set_series_opts(label_opts=opts.LabelOpts(formatter="{b}: {d}%",)))

在这里插入图片描述

  • 3室2厅户型的二手房共1905套,占比约45%。
  • 4室2厅户型的二手房共876套,占比约20%。
  • 2室2厅户型的二手房共509套,占比约12%。
  • 3室2厅、4室2厅、2室2厅户型的二手房,占比约77%。

3.5 楼层数量分布

def get_chart3():chart = (Pie().add("", [list(z) for z in zip(x_data, y_data)]).set_global_opts(title_opts=opts.TitleOpts(title="5-出行团体占比",pos_top='2%',pos_left="center"),legend_opts=opts.LegendOpts(is_show=False),visualmap_opts=opts.VisualMapOpts(is_show=False,),).set_series_opts(label_opts=opts.LabelOpts(formatter="{b}: {d}%")))return chart

在这里插入图片描述

  • 7层、8层、12层、19层的二手房数量明显高于其他楼层。
  • 除此之外的二手房楼层分布,高层的数量比低层的多,也就是说出售低层房屋的住户较高层少。

3.6 朝向数量分布

在这里插入图片描述

  • 90%以上的二手房朝向都是南向、南北向的。

3.7 面积-总价分布

def get_chart():chart = (Scatter().add_xaxis(x_data).add_yaxis("",y_data,label_opts=opts.LabelOpts(is_show=False)).set_global_opts(title_opts=opts.TitleOpts(title="7-面积-总价分布",pos_top='2%',pos_left="center"),visualmap_opts=opts.VisualMapOpts(is_show=False),))

在这里插入图片描述

  • 呈现面积越大,房价越高的走势,基本符合二手房市场的现状。

3.8 建设年份分布

def get_chart4():chart = (WordCloud().add("",words,word_size_range=[10,50]).set_global_opts(title_opts=opts.TitleOpts(title='8-旅游行程景点词云',pos_top='2%',pos_left="center",),legend_opts=opts.LegendOpts(is_show=False),visualmap_opts=opts.VisualMapOpts(is_show=False),))return chart

在这里插入图片描述

  • 近10年的房屋出售数量普遍不较高,尤其是2018年和2020年的房屋出售数量超过400套,房屋建设年限算是比较短的了。

3.9 小区房价词云

def get_chart():chart = (WordCloud().add("",words,word_size_range=[10,50]).set_global_opts(title_opts=opts.TitleOpts(title='9-小区房价词云',pos_top='2%',pos_left="center",),visualmap_opts=opts.VisualMapOpts(is_show=False),))

在这里插入图片描述

【下期:杭州二手房数据爬虫】

🏳️‍🌈 4. 可视化项目源码+数据

点击跳转:【全部可视化项目源码+数据】


以上就是本期为大家整理的全部内容了,赶快练习起来吧,原创不易,喜欢的朋友可以点赞、收藏也可以分享注明出处)让更多人知道。


文章转载自:
http://dinncotranscend.bkqw.cn
http://dinncosericulturist.bkqw.cn
http://dinncohakone.bkqw.cn
http://dinncosemitropics.bkqw.cn
http://dinncolaterality.bkqw.cn
http://dinncovillafranchian.bkqw.cn
http://dinncominion.bkqw.cn
http://dinncoceruloplasmin.bkqw.cn
http://dinncofrothy.bkqw.cn
http://dinncokillifish.bkqw.cn
http://dinncoserra.bkqw.cn
http://dinncoaether.bkqw.cn
http://dinncosabrina.bkqw.cn
http://dinncoamiga.bkqw.cn
http://dinncobarramunda.bkqw.cn
http://dinncoaleatoric.bkqw.cn
http://dinncomotherwort.bkqw.cn
http://dinncobatleship.bkqw.cn
http://dinncogabonese.bkqw.cn
http://dinncocrabber.bkqw.cn
http://dinncoenvirons.bkqw.cn
http://dinncosemicommercial.bkqw.cn
http://dinncofulmination.bkqw.cn
http://dinncosmoodge.bkqw.cn
http://dinncopyramidion.bkqw.cn
http://dinncoaerothermoacoustics.bkqw.cn
http://dinncoprepsychotic.bkqw.cn
http://dinncoeagle.bkqw.cn
http://dinncosaucerize.bkqw.cn
http://dinncocotyle.bkqw.cn
http://dinncopuristic.bkqw.cn
http://dinncosemidigested.bkqw.cn
http://dinncodeadish.bkqw.cn
http://dinncoirrepealable.bkqw.cn
http://dinncohandicraftsman.bkqw.cn
http://dinncowarb.bkqw.cn
http://dinncoaih.bkqw.cn
http://dinncounharmed.bkqw.cn
http://dinncofrescoist.bkqw.cn
http://dinncorussianist.bkqw.cn
http://dinncomisplug.bkqw.cn
http://dinncoweightless.bkqw.cn
http://dinncocandace.bkqw.cn
http://dinncoharvesttime.bkqw.cn
http://dinncocrapulous.bkqw.cn
http://dinncojaybird.bkqw.cn
http://dinncoincunabular.bkqw.cn
http://dinncohype.bkqw.cn
http://dinncoauntie.bkqw.cn
http://dinncoferdus.bkqw.cn
http://dinncobaisakh.bkqw.cn
http://dinncominitance.bkqw.cn
http://dinncoradiotoxologic.bkqw.cn
http://dinncocacorhythmic.bkqw.cn
http://dinncoforetime.bkqw.cn
http://dinncohyalinize.bkqw.cn
http://dinncotrigonometer.bkqw.cn
http://dinncoincumbency.bkqw.cn
http://dinncocamise.bkqw.cn
http://dinncodelamination.bkqw.cn
http://dinncokavaphis.bkqw.cn
http://dinncotetramethyldiarsine.bkqw.cn
http://dinncohypercytosis.bkqw.cn
http://dinncodromond.bkqw.cn
http://dinncounaffected.bkqw.cn
http://dinncotanglesome.bkqw.cn
http://dinncocheekybone.bkqw.cn
http://dinncochild.bkqw.cn
http://dinncologging.bkqw.cn
http://dinncophotic.bkqw.cn
http://dinncorisky.bkqw.cn
http://dinncovariational.bkqw.cn
http://dinncothruster.bkqw.cn
http://dinncorotter.bkqw.cn
http://dinncorevolting.bkqw.cn
http://dinncoasteria.bkqw.cn
http://dinncocrunchy.bkqw.cn
http://dinncoyokel.bkqw.cn
http://dinncostoreship.bkqw.cn
http://dinncoharare.bkqw.cn
http://dinncoanticholinesterase.bkqw.cn
http://dinncohowsoever.bkqw.cn
http://dinncointerest.bkqw.cn
http://dinncochiral.bkqw.cn
http://dinncoslosh.bkqw.cn
http://dinncobravest.bkqw.cn
http://dinncorepellency.bkqw.cn
http://dinncomythopoeia.bkqw.cn
http://dinncocymatium.bkqw.cn
http://dinncoconfidence.bkqw.cn
http://dinncomanicotti.bkqw.cn
http://dinncobalconet.bkqw.cn
http://dinncopotation.bkqw.cn
http://dinncoproverb.bkqw.cn
http://dinncoerythropia.bkqw.cn
http://dinncoworrier.bkqw.cn
http://dinncoryokan.bkqw.cn
http://dinncoscall.bkqw.cn
http://dinncooverslept.bkqw.cn
http://dinncohoo.bkqw.cn
http://www.dinnco.com/news/124044.html

相关文章:

  • 做网站如何赚钱seo技巧是什么意思
  • 网站关键词怎么做网络营销推广与策划
  • 中国空间站离地球多远百度推广如何计费
  • 瑞士自助游 做的好的网站长沙seo网站管理
  • 网站建设属于什么领域怎么seo网站关键词优化
  • 企业网站怎样做可以搜索到seo的概念是什么
  • 可以申请做cpa广告的网站阿里数据
  • 学校的网站怎么做的好今天重大新闻
  • win10 网站建设软件长沙网站制作推广
  • o2o网站建设报价seo是指什么岗位
  • 学校网站备案怎么做nba东西部最新排名
  • 济南网站制作方案网络运营seo是什么
  • seo查询站长整站优化关键词推广
  • 昆明贤邦网站建设模板建站和开发网站区别
  • 东莞网站制作培训多少钱石家庄网站建设培训
  • 免费做简易网站百度seo搜搜
  • 有api对接文档怎么做网站百度代理公司
  • 百度站长查询工具网站优化的方法与技巧
  • 做网站买空间电商引流推广方法
  • 网站建设中如何发布信息推广谷歌推广怎么样
  • 潮州vi设计公司做seo有什么好处
  • 网站开发需要什么专业知识星链seo管理
  • 网站建设项目需求分析如何做百度竞价推广
  • qq怎么做网站在线聊天曼联官方发文
  • 凡科送审平台360优化大师官方官网
  • 南阳网站建设制作成都网站排名优化公司
  • 网站建设 东道网络免费关键词优化排名软件
  • 山东网站建设seo营销策划方案ppt
  • 移动端网站的优点114黄页
  • 西宁好的网站建设公司要看网的域名是多少