Table of Contents

  • 1  对各一级行业分析
  • 2  对女装行业进行分析
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import warnings
warnings.filterwarnings("ignore")
import plotly.express as px
import plotly as py
from plotly.offline import iplot
%matplotlib inline

对各一级行业分析

hangye_data=pd.read_excel(r"C:\Users\qingmu_622\Desktop\我的\19-20年月度分析.xlsx",encoding='utf-8')
hangye_data.head()
platform cid industry category themonth 销售额 访客 客群指数 行业简称 年月
0 天猫 50010368 ZIPPO/瑞士军刀/眼镜 太阳眼镜 2020-01-01 62484514.13 6663217 110583.28 眼镜 1月 2020年 2020年1月
1 天猫 122444001 ZIPPO/瑞士军刀/眼镜 品牌打火机及配件 2020-01-01 76701866.47 12410872 153290.58 眼镜 1月 2020年 2020年1月
2 天猫 290601 ZIPPO/瑞士军刀/眼镜 瑞士军刀 2020-01-01 1093623.14 379162 8693.60 眼镜 1月 2020年 2020年1月
3 天猫 50012709 ZIPPO/瑞士军刀/眼镜 酒具 2020-01-01 566046.55 77519 8419.74 眼镜 1月 2020年 2020年1月
4 天猫 2909 ZIPPO/瑞士军刀/眼镜 烟具 2020-01-01 15652930.86 2556669 71458.01 眼镜 1月 2020年 2020年1月
hangye_data['客群指数']=round(hangye_data['客群指数'],0).astype(int)
hangye_data["uv价值"]=hangye_data['销售额']/hangye_data['访客']
hangye_data["客单价"]=hangye_data['销售额']/hangye_data['客群指数']
hangye_data['支付转化率%']=round(hangye_data["客群指数"]/hangye_data["访客"]*100,2)
# hangye_data['支付转化率%']=hangye_data["支付转化率"].apply(lambda x:"%.2f%%" % (x*100))
hangye_data.head()
platform cid industry category themonth 销售额 访客 客群指数 行业简称 年月 uv价值 客单价 支付转化率%
0 天猫 50010368 ZIPPO/瑞士军刀/眼镜 太阳眼镜 2020-01-01 62484514.13 6663217 110583 眼镜 1月 2020年 2020年1月 9.377530 565.046292 1.66
1 天猫 122444001 ZIPPO/瑞士军刀/眼镜 品牌打火机及配件 2020-01-01 76701866.47 12410872 153291 眼镜 1月 2020年 2020年1月 6.180216 500.367709 1.24
2 天猫 290601 ZIPPO/瑞士军刀/眼镜 瑞士军刀 2020-01-01 1093623.14 379162 8694 眼镜 1月 2020年 2020年1月 2.884316 125.790561 2.29
3 天猫 50012709 ZIPPO/瑞士军刀/眼镜 酒具 2020-01-01 566046.55 77519 8420 眼镜 1月 2020年 2020年1月 7.302036 67.226431 10.86
4 天猫 2909 ZIPPO/瑞士军刀/眼镜 烟具 2020-01-01 15652930.86 2556669 71458 眼镜 1月 2020年 2020年1月 6.122392 219.050783 2.79
hangye_data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2762 entries, 0 to 2761
Data columns (total 15 columns):
platform    2762 non-null object
cid         2762 non-null int64
industry    2762 non-null object
category    2762 non-null object
themonth    2762 non-null datetime64[ns]
销售额         2762 non-null float64
访客          2762 non-null int64
客群指数        2762 non-null int32
行业简称        2762 non-null object
月           2762 non-null object
年           2762 non-null object
年月          2762 non-null object
uv价值        2743 non-null float64
客单价         2740 non-null float64
支付转化率%      2743 non-null float64
dtypes: datetime64[ns](1), float64(4), int32(1), int64(2), object(7)
memory usage: 313.0+ KB
hangye_data.describe()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
count 2.762000e+03 2.762000e+03 2.762000e+03 2.762000e+03 2743.000000 2740.000000 2743.00
mean 7.880241e+07 1.943388e+08 1.761449e+07 1.549741e+05 inf inf inf
std 4.950330e+07 3.758401e+08 2.521706e+07 1.550091e+05 NaN NaN NaN
min 1.622000e+03 0.000000e+00 0.000000e+00 0.000000e+00 0.000000 5.895849 0.00
25% 5.001113e+07 1.002853e+07 2.184107e+06 3.902300e+04 3.953178 209.607119 0.80
50% 5.001320e+07 5.073543e+07 7.790471e+06 1.030285e+05 6.837966 504.054329 1.40
75% 1.214120e+08 2.049130e+08 2.162032e+07 2.328680e+05 11.609612 1072.098608 2.37
max 2.013131e+08 4.828030e+09 1.701662e+08 1.002780e+06 inf inf inf
sales_cut=pd.cut(hangye_data["销售额"],bins=10,right=False)
bin_sales=pd.DataFrame(sales_cut.value_counts(sort=False))
bin_sales
销售额
[0.0, 482803020.99) 2455
[482803020.99, 965606041.98) 178
[965606041.98, 1448409062.97) 78
[1448409062.97, 1931212083.96) 26
[1931212083.96, 2414015104.95) 14
[2414015104.95, 2896818125.94) 6
[2896818125.94, 3379621146.93) 2
[3379621146.93, 3862424167.92) 1
[3862424167.92, 4345227188.91) 0
[4345227188.91, 4832858240.11) 2
bin_sales.rename(columns={"销售额":"频数"},inplace=True)
bin_sales["频率"]=bin_sales["频数"]/bin_sales["频数"].sum()
bin_sales["累计频率"]=bin_sales["频率"].cumsum()
# bin_sales['频率%']=round(bin_sales["频率"]*100,2)
bin_sales['频率%'] = bin_sales['频率'].apply(lambda x: "%.2f%%" % (x*100))
bin_sales.style.bar(["频率","累计频率"],color="skyblue",width=100)
            <tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row0" class="row_heading level0 row0" >[0.0, 482803020.99)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow0_col0" class="data row0 col0" >2455</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow0_col1" class="data row0 col1" >0.888849</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow0_col2" class="data row0 col2" >0.888849</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow0_col3" class="data row0 col3" >88.88%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row1" class="row_heading level0 row1" >[482803020.99, 965606041.98)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow1_col0" class="data row1 col0" >178</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow1_col1" class="data row1 col1" >0.0644461</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow1_col2" class="data row1 col2" >0.953295</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow1_col3" class="data row1 col3" >6.44%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row2" class="row_heading level0 row2" >[965606041.98, 1448409062.97)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow2_col0" class="data row2 col0" >78</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow2_col1" class="data row2 col1" >0.0282404</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow2_col2" class="data row2 col2" >0.981535</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow2_col3" class="data row2 col3" >2.82%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row3" class="row_heading level0 row3" >[1448409062.97, 1931212083.96)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow3_col0" class="data row3 col0" >26</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow3_col1" class="data row3 col1" >0.00941347</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow3_col2" class="data row3 col2" >0.990949</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow3_col3" class="data row3 col3" >0.94%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row4" class="row_heading level0 row4" >[1931212083.96, 2414015104.95)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow4_col0" class="data row4 col0" >14</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow4_col1" class="data row4 col1" >0.00506879</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow4_col2" class="data row4 col2" >0.996017</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow4_col3" class="data row4 col3" >0.51%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row5" class="row_heading level0 row5" >[2414015104.95, 2896818125.94)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow5_col0" class="data row5 col0" >6</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow5_col1" class="data row5 col1" >0.00217234</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow5_col2" class="data row5 col2" >0.99819</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow5_col3" class="data row5 col3" >0.22%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row6" class="row_heading level0 row6" >[2896818125.94, 3379621146.93)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow6_col0" class="data row6 col0" >2</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow6_col1" class="data row6 col1" >0.000724113</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow6_col2" class="data row6 col2" >0.998914</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow6_col3" class="data row6 col3" >0.07%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row7" class="row_heading level0 row7" >[3379621146.93, 3862424167.92)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow7_col0" class="data row7 col0" >1</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow7_col1" class="data row7 col1" >0.000362056</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow7_col2" class="data row7 col2" >0.999276</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow7_col3" class="data row7 col3" >0.04%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row8" class="row_heading level0 row8" >[3862424167.92, 4345227188.91)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow8_col0" class="data row8 col0" >0</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow8_col1" class="data row8 col1" >0</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow8_col2" class="data row8 col2" >0.999276</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow8_col3" class="data row8 col3" >0.00%</td></tr><tr><th id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0flevel0_row9" class="row_heading level0 row9" >[4345227188.91, 4832858240.11)</th><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow9_col0" class="data row9 col0" >2</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow9_col1" class="data row9 col1" >0.000724113</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow9_col2" class="data row9 col2" >1</td><td id="T_4ffd1e06_d233_11ea_8b01_48a472e0af0frow9_col3" class="data row9 col3" >0.07%</td></tr>
</tbody></table>
频数 频率 累计频率 频率%
# hangye_data['客单价']=hangye_data["客单价"].fillna(hangye_data["客单价"].mean())
# hangye_data.isnull().sum()
plt.rcParams['font.sans-serif']=['SimHei']
hangye_data=hangye_data[hangye_data['行业简称']!='床上用品']
group_danjia=hangye_data.groupby("行业简称").mean()
plt.figure(figsize=(10,5))
group_danjia['uv价值'].plot.area(alpha = 0.5,grid=True)
group_danjia['uv价值'].plot(c="orange")
# plt.grid(ls="--")
plt.xticks(rotation=45,fontsize=13)
plt.xlabel("行业类目",fontsize=15)
plt.ylabel("uv价值(元)",fontsize=15)
plt.yticks(fontsize=13)
(array([ 0.,  2.,  4.,  6.,  8., 10., 12., 14., 16.]),<a list of 9 Text yticklabel objects>)

[外


plt.rcParams['font.sans-serif']=['SimHei']
# hangye_data=hangye_data[hangye_data['行业简称']!='床上用品']
group_danjia1=hangye_data.groupby("月").mean()
plt.figure(figsize=(8,6))
group_danjia1['uv价值'].plot.bar(color = 'skyblue',alpha = 0.8,figsize=(8,3),grid=True)
# group_danjia1['uv价值'].plot(c="deeppink")
for x,y in enumerate(group_danjia1['uv价值']):plt.text(x,y+0.3, "%s元" % round(y,1),ha="center",fontsize=10)
plt.grid(ls="--",c="skyblue")
plt.xticks(fontsize=13)
plt.xlabel("月份",fontsize=15)
plt.ylabel("uv价值(元)",fontsize=15)
plt.yticks(fontsize=13)
(array([ 0.,  2.,  4.,  6.,  8., 10., 12.]),<a list of 7 Text yticklabel objects>)

[外链图片转存失败,
源站可能有防盗在这里插入图片描述
链机制,建议将图片保存下来直接上传(img-XwORsl5c-1597195737516)(output_13_1.png)]

group_danjia['uv价值']
行业简称
女装       7.130471
女鞋       5.801102
尿片洗护    13.727018
手表      10.118119
男装      10.943612
男鞋       8.579198
眼镜       9.520698
童装       6.674772
童鞋       4.436967
箱包       6.676500
美容护肤    11.908728
运动鞋      8.251129
饰品       5.181402
Name: uv价值, dtype: float64
data_19=hangye_data[hangye_data["年"]=='2019年']
data_20=hangye_data[hangye_data['年']=='2020年']
data_19.shape
(1256, 15)
data_20.shape
(1202, 15)
group_19=data_19.groupby("月").sum()
group_20=data_20.groupby("月").sum()
group_19['销售额']=round(group_19["销售额"])
group_20['销售额']=round(group_20["销售额"])
group_19.head()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
1月 15595391907 4.818361e+10 3755987467 32653005 2044.785769 inf 454.80
2月 15595391907 2.317487e+10 2952157746 24162266 1484.188028 inf 431.71
3月 15595391907 4.517711e+10 3968253714 35412908 1932.354685 1.767984e+05 415.21
4月 15595391907 4.097620e+10 3965333897 34975519 1702.405829 1.568339e+05 393.03
5月 15796604909 4.282773e+10 4068359369 35823608 1672.130510 1.573439e+05 370.35
import plotly.graph_objects as go
months=["一月","二月","三月","四月","五月","六月"]
fig=go.Figure(data=[go.Bar(name='2019年',x=months,y=group_19.iloc[:,1],text=group_19.iloc[:,1],textposition="outside",marker_color='midnightblue'),go.Bar(name="2020年",x=months,y=group_20.iloc[:,1],text=group_20.iloc[:,1],marker_color='skyblue', hovertext=['', '', '',"","","六月达到最高"],textposition="outside")
])
fig.update_traces(marker_line_color="black",marker_line_width=1.2,opacity=0.9)
fig.update_layout(xaxis_tickangle=25,bargap=0.25,title_text="19-20年不同月份下销售额",uniformtext_minsize=8, xaxis_tickfont_size=17,bargroupgap=0.015,yaxis=dict( title='销售金额', titlefont_size=18, tickfont_size=16),xaxis=dict( title='月份', titlefont_size=18, tickfont_size=16),template="plotly_dark"
)
fig.show()
        <div id="94ac22c4-78fc-4720-bad7-9a450b8c8c43" class="plotly-graph-div" style="height:525px; width:100%;"></div><script type="text/javascript">require(["plotly"], function(Plotly) {window.PLOTLYENV=window.PLOTLYENV || {};if (document.getElementById("94ac22c4-78fc-4720-bad7-9a450b8c8c43")) {Plotly.newPlot('94ac22c4-78fc-4720-bad7-9a450b8c8c43',[{"marker": {"color": "midnightblue", "line": {"color": "black", "width": 1.2}}, "name": "2019\u5e74", "opacity": 0.9, "text": [48183607136.0, 23174873260.0, 45177107966.0, 40976201875.0, 42827731612.0, 53163083776.0], "textposition": "outside", "type": "bar", "x": ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708"], "y": [48183607136.0, 23174873260.0, 45177107966.0, 40976201875.0, 42827731612.0, 53163083776.0]}, {"hovertext": ["", "", "", "", "", "\u516d\u6708\u8fbe\u5230\u6700\u9ad8"], "marker": {"color": "skyblue", "line": {"color": "black", "width": 1.2}}, "name": "2020\u5e74", "opacity": 0.9, "text": [41260788011.0, 20407848457.0, 44966949091.0, 40610223743.0, 48298933267.0, 62465685382.0], "textposition": "outside", "type": "bar", "x": ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708"], "y": [41260788011.0, 20407848457.0, 44966949091.0, 40610223743.0, 48298933267.0, 62465685382.0]}],{"bargap": 0.25, "bargroupgap": 0.015, "template": {"data": {"bar": [{"error_x": {"color": "#f2f5fa"}, "error_y": {"color": "#f2f5fa"}, "marker": {"line": {"color": "rgb(17,17,17)", "width": 0.5}}, "type": "bar"}], "barpolar": [{"marker": {"line": {"color": "rgb(17,17,17)", "width": 0.5}}, "type": "barpolar"}], "carpet": [{"aaxis": {"endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6"}, "baxis": {"endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6"}, "type": "carpet"}], "choropleth": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "choropleth"}], "contour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "contour"}], "contourcarpet": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "contourcarpet"}], "heatmap": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmap"}], "heatmapgl": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmapgl"}], "histogram": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "histogram"}], "histogram2d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2d"}], "histogram2dcontour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2dcontour"}], "mesh3d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "mesh3d"}], "parcoords": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "parcoords"}], "pie": [{"automargin": true, "type": "pie"}], "scatter": [{"marker": {"line": {"color": "#283442"}}, "type": "scatter"}], "scatter3d": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter3d"}], "scattercarpet": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattercarpet"}], "scattergeo": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergeo"}], "scattergl": [{"marker": {"line": {"color": "#283442"}}, "type": "scattergl"}], "scattermapbox": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattermapbox"}], "scatterpolar": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolar"}], "scatterpolargl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolargl"}], "scatterternary": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterternary"}], "surface": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "surface"}], "table": [{"cells": {"fill": {"color": "#506784"}, "line": {"color": "rgb(17,17,17)"}}, "header": {"fill": {"color": "#2a3f5f"}, "line": {"color": "rgb(17,17,17)"}}, "type": "table"}]}, "layout": {"annotationdefaults": {"arrowcolor": "#f2f5fa", "arrowhead": 0, "arrowwidth": 1}, "coloraxis": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "colorscale": {"diverging": [[0, "#8e0152"], [0.1, "#c51b7d"], [0.2, "#de77ae"], [0.3, "#f1b6da"], [0.4, "#fde0ef"], [0.5, "#f7f7f7"], [0.6, "#e6f5d0"], [0.7, "#b8e186"], [0.8, "#7fbc41"], [0.9, "#4d9221"], [1, "#276419"]], "sequential": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "sequentialminus": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]]}, "colorway": ["#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52"], "font": {"color": "#f2f5fa"}, "geo": {"bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784"}, "hoverlabel": {"align": "left"}, "hovermode": "closest", "mapbox": {"style": "dark"}, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": {"angularaxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}, "bgcolor": "rgb(17,17,17)", "radialaxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}}, "scene": {"xaxis": {"backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3"}, "yaxis": {"backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3"}, "zaxis": {"backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3"}}, "shapedefaults": {"line": {"color": "#f2f5fa"}}, "sliderdefaults": {"bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0}, "ternary": {"aaxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}, "baxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}, "bgcolor": "rgb(17,17,17)", "caxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}}, "title": {"x": 0.05}, "updatemenudefaults": {"bgcolor": "#506784", "borderwidth": 0}, "xaxis": {"automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "#283442", "zerolinewidth": 2}, "yaxis": {"automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "#283442", "zerolinewidth": 2}}}, "title": {"text": "19-20\u5e74\u4e0d\u540c\u6708\u4efd\u4e0b\u9500\u552e\u989d"}, "uniformtext": {"minsize": 8}, "xaxis": {"tickangle": 25, "tickfont": {"size": 16}, "title": {"font": {"size": 18}, "text": "\u6708\u4efd"}}, "yaxis": {"tickfont": {"size": 16}, "title": {"font": {"size": 18}, "text": "\u9500\u552e\u91d1\u989d"}}},{"responsive": true}).then(function(){

var gd = document.getElementById(‘94ac22c4-78fc-4720-bad7-9a450b8c8c43’);
var x = new MutationObserver(function (mutations, observer) {{
var display = window.getComputedStyle(gd).display;
if (!display || display === ‘none’) {{
console.log([gd, ‘removed!’]);
Plotly.purge(gd);
observer.disconnect();
}}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest(’#notebook-container’);
if (notebookContainer) {{
x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest(’.output’);
if (outputEl) {{
x.observe(outputEl, {childList: true});
}}

                    })};});</script></div>
group_rate19=pd.DataFrame(data_19.groupby("月")["支付转化率%"].mean().apply(lambda x:"%.2f%%" % x))
group_rate20=pd.DataFrame(data_20.groupby("月")["支付转化率%"].mean().apply(lambda x:"%.2f%%" % x))
import plotly.graph_objects as go
months=["一月","二月","三月","四月","五月","六月"]
fig=go.Figure(data=[go.Bar(name='2019年',x=months,y=group_rate19.iloc[:,0],text=group_rate19.iloc[:,0],hovertext=['最高为2.19%', '', '',"","",""],textposition="outside",marker_color='mediumorchid'),go.Bar(name="2020年",x=months,y=group_rate20.iloc[:,0],text=group_rate20.iloc[:,0],marker_color='navy', textposition="outside")
])
fig.update_traces(marker_line_color="black",marker_line_width=1.2,opacity=0.9)
fig.update_layout(
#     xaxis_tickangle=25,bargap=0.25,title_text="19-20年不同月份下的支付转化率",uniformtext_minsize=8, xaxis_tickfont_size=17,bargroupgap=0.015,yaxis=dict( title='支付转化率', titlefont_size=20, tickfont_size=16),xaxis=dict( title='月份', titlefont_size=20, tickfont_size=18),template='plotly_white'
)
fig.show()
        <div id="32ad3cfd-44ce-4838-b91e-391eb169da78" class="plotly-graph-div" style="height:525px; width:100%;"></div><script type="text/javascript">require(["plotly"], function(Plotly) {window.PLOTLYENV=window.PLOTLYENV || {};if (document.getElementById("32ad3cfd-44ce-4838-b91e-391eb169da78")) {Plotly.newPlot('32ad3cfd-44ce-4838-b91e-391eb169da78',[{"hovertext": ["\u6700\u9ad8\u4e3a2.19%", "", "", "", "", ""], "marker": {"color": "mediumorchid", "line": {"color": "black", "width": 1.2}}, "name": "2019\u5e74", "opacity": 0.9, "text": ["2.19%", "2.08%", "2.00%", "1.89%", "1.77%", "1.96%"], "textposition": "outside", "type": "bar", "x": ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708"], "y": ["2.19%", "2.08%", "2.00%", "1.89%", "1.77%", "1.96%"]}, {"marker": {"color": "navy", "line": {"color": "black", "width": 1.2}}, "name": "2020\u5e74", "opacity": 0.9, "text": ["1.94%", "1.67%", "1.90%", "1.96%", "1.71%", "1.88%"], "textposition": "outside", "type": "bar", "x": ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708"], "y": ["1.94%", "1.67%", "1.90%", "1.96%", "1.71%", "1.88%"]}],{"bargap": 0.25, "bargroupgap": 0.015, "template": {"data": {"bar": [{"error_x": {"color": "#2a3f5f"}, "error_y": {"color": "#2a3f5f"}, "marker": {"line": {"color": "white", "width": 0.5}}, "type": "bar"}], "barpolar": [{"marker": {"line": {"color": "white", "width": 0.5}}, "type": "barpolar"}], "carpet": [{"aaxis": {"endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f"}, "baxis": {"endlinecolor": "#2a3f5f", "gridcolor": "#C8D4E3", "linecolor": "#C8D4E3", "minorgridcolor": "#C8D4E3", "startlinecolor": "#2a3f5f"}, "type": "carpet"}], "choropleth": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "choropleth"}], "contour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "contour"}], "contourcarpet": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "contourcarpet"}], "heatmap": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmap"}], "heatmapgl": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmapgl"}], "histogram": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "histogram"}], "histogram2d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2d"}], "histogram2dcontour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2dcontour"}], "mesh3d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "mesh3d"}], "parcoords": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "parcoords"}], "pie": [{"automargin": true, "type": "pie"}], "scatter": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter"}], "scatter3d": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter3d"}], "scattercarpet": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattercarpet"}], "scattergeo": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergeo"}], "scattergl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergl"}], "scattermapbox": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattermapbox"}], "scatterpolar": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolar"}], "scatterpolargl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolargl"}], "scatterternary": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterternary"}], "surface": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "surface"}], "table": [{"cells": {"fill": {"color": "#EBF0F8"}, "line": {"color": "white"}}, "header": {"fill": {"color": "#C8D4E3"}, "line": {"color": "white"}}, "type": "table"}]}, "layout": {"annotationdefaults": {"arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1}, "coloraxis": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "colorscale": {"diverging": [[0, "#8e0152"], [0.1, "#c51b7d"], [0.2, "#de77ae"], [0.3, "#f1b6da"], [0.4, "#fde0ef"], [0.5, "#f7f7f7"], [0.6, "#e6f5d0"], [0.7, "#b8e186"], [0.8, "#7fbc41"], [0.9, "#4d9221"], [1, "#276419"]], "sequential": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "sequentialminus": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]]}, "colorway": ["#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52"], "font": {"color": "#2a3f5f"}, "geo": {"bgcolor": "white", "lakecolor": "white", "landcolor": "white", "showlakes": true, "showland": true, "subunitcolor": "#C8D4E3"}, "hoverlabel": {"align": "left"}, "hovermode": "closest", "mapbox": {"style": "light"}, "paper_bgcolor": "white", "plot_bgcolor": "white", "polar": {"angularaxis": {"gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": ""}, "bgcolor": "white", "radialaxis": {"gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": ""}}, "scene": {"xaxis": {"backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8"}, "yaxis": {"backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8"}, "zaxis": {"backgroundcolor": "white", "gridcolor": "#DFE8F3", "gridwidth": 2, "linecolor": "#EBF0F8", "showbackground": true, "ticks": "", "zerolinecolor": "#EBF0F8"}}, "shapedefaults": {"line": {"color": "#2a3f5f"}}, "ternary": {"aaxis": {"gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": ""}, "baxis": {"gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": ""}, "bgcolor": "white", "caxis": {"gridcolor": "#DFE8F3", "linecolor": "#A2B1C6", "ticks": ""}}, "title": {"x": 0.05}, "xaxis": {"automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2}, "yaxis": {"automargin": true, "gridcolor": "#EBF0F8", "linecolor": "#EBF0F8", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "#EBF0F8", "zerolinewidth": 2}}}, "title": {"text": "19-20\u5e74\u4e0d\u540c\u6708\u4efd\u4e0b\u7684\u652f\u4ed8\u8f6c\u5316\u7387"}, "uniformtext": {"minsize": 8}, "xaxis": {"tickfont": {"size": 18}, "title": {"font": {"size": 20}, "text": "\u6708\u4efd"}}, "yaxis": {"tickfont": {"size": 16}, "title": {"font": {"size": 20}, "text": "\u652f\u4ed8\u8f6c\u5316\u7387"}}},{"responsive": true}).then(function(){

var gd = document.getElementById(‘32ad3cfd-44ce-4838-b91e-391eb169da78’);
var x = new MutationObserver(function (mutations, observer) {{
var display = window.getComputedStyle(gd).display;
if (!display || display === ‘none’) {{
console.log([gd, ‘removed!’]);
Plotly.purge(gd);
observer.disconnect();
}}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest(’#notebook-container’);
if (notebookContainer) {{
x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest(’.output’);
if (outputEl) {{
x.observe(outputEl, {childList: true});
}}

                    })};});</script></div>
group_rate=(group_20['销售额']/group_19['销售额']-1)*100
group_rate
月
1月   -14.367582
2月   -11.939762
3月    -0.465189
4月    -0.893148
5月    12.774904
6月    17.498236
Name: 销售额, dtype: float64
import matplotlib
import numpy as np
matplotlib.rcParams["font.sans-serif"]=["SimHei"]
matplotlib.rcParams['axes.unicode_minus']=False
fig = plt.figure(figsize=(9,6))
plt.grid(ls="--")
ax1 = fig.add_subplot(111)size = 6
x = np.arange(size)
total_width, n = 0.8, 2
width = total_width / n
x = x - (total_width - width) / 2# ax1.plot(group_19['销售额'],label="19年",marker="*")
ax1.bar(x,height=group_19['销售额'],width=width,color="thistle",label="19年")
# ax1.plot(group_20['销售额'],label="20年",marker=".")
ax1.bar(x+width,height=group_20['销售额'],width=width,color="skyblue",label="20年")
ax1.set_ylabel("销售额(百亿)",fontsize=16,labelpad=12)
ax1.set_title("19-20年不同月份下销售额及增长率",fontsize='18',pad=20)
ax1.set_xlabel("月份",fontsize=15,labelpad=12)
ax1.legend(bbox_to_anchor=(0.14,1))
# for x,y in enumerate(group_19['销售额']):
#     plt.text(x,y+0.3, "%s元" % round(y,1),ha="right",fontsize=10)
# for x,y in enumerate(group_20['销售额']):
#     plt.text(x,y+0.3, "%s元" % round(y,1),ha="left",fontsize=10)
plt.yticks(fontsize=15)
plt.xticks(fontsize=15)ax2 = ax1.twinx()  # 这个很重要噢
ax2.plot(group_rate ,marker='o',ms=10,c="coral",label="同比增长率")
ax2.set_ylabel("同比增长率(%)",fontsize=15)
ax2.set_ylim([-20,20])
plt.axhline(0,color='royalblue',linestyle="--",alpha=0.8)
ax2.legend(bbox_to_anchor=(0.2,0.88))
for x,y in enumerate(group_rate):plt.text(x,y+0.3, "%s%%" % round(y,1),ha="right",fontsize=12)

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-okZRbgsl-1597195737518)(output_22
_0.png)]

group_rate1=(group_20['访客']/group_19['访客']-1)*100
group_rate1
月
1月    4.330794
2月    6.017685
3月    5.682588
4月    3.946420
5月    9.947627
6月    4.402785
Name: 访客, dtype: float64
import matplotlib
import numpy as np
matplotlib.rcParams["font.sans-serif"]=["SimHei"]
matplotlib.rcParams['axes.unicode_minus']=False
fig = plt.figure(figsize=(9,6))
plt.grid(ls="--")
ax1 = fig.add_subplot(111)size = 6
x = np.arange(size)
total_width, n = 0.8, 2
width = total_width / n
x = x - (total_width - width) / 2# ax1.plot(group_19['销售额'],label="19年",marker="*")
ax1.bar(x,height=group_19['访客'],width=width,color="orange",label="19年")
# ax1.plot(group_20['销售额'],label="20年",marker=".")
ax1.bar(x+width,height=group_20['访客'],width=width,color="royalblue",label="20年")
ax1.set_ylabel("访客数(十亿)",fontsize=16,labelpad=12)
ax1.set_title("19-20年不同月份下访客数变化及增长率",fontsize='18',pad=20)
ax1.set_xlabel("月份",fontsize=15,labelpad=12)
ax1.legend(bbox_to_anchor=(0.14,1))
plt.yticks(fontsize=15)
plt.xticks(fontsize=15)
# x1=['一月','二月',"三月","四月","五月","六月"]
# y1=['-14.419152',"-12.285846","0.087202","0.078587","13.977355","16.454565"]
# for a, b in zip(x1, y1):
#    ax2.text(a, b, b, ha='center', va='bottom', fontsize=20)ax2 = ax1.twinx()  # 这个很重要噢
ax2.plot(group_rate1 ,marker='>',ms=10,c="red",label="同比增长率")
ax2.set_ylabel("同比增长率(%)",fontsize=15)
ax2.set_ylim([0,15])# ax2.text(x=group_rate.index.tolist(),y=group_rate.values,s=group_rate.values, ha='center', va='bottom', fontsize=20)ax2.legend(bbox_to_anchor=(0.32,1))
<matplotlib.legend.Legend at 0x158b245ef98>

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5eBZR7Ae-1597195737520)
(out在这里插入图片描述
put_24_1.png)]

group_20['访客']
月
1月    3918651529
2月    3129809290
3月    4193753215
4月    4121822644
5月    4473064598
6月    4224718219
Name: 访客, dtype: int64
group_hyjc19=data_19.groupby("行业简称").sum()
group_hyjc19['销售额']=round(group_hyjc19['销售额'])
group_hyjc19.head()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
行业简称
女装 6261806310 7.945264e+10 8515147650 40891800 1188.732764 251402.387000 85.81
女鞋 5730950460 1.489313e+10 1691964460 10723067 244.706016 38735.562867 36.49
尿片洗护 5672582538 1.156226e+10 770647908 18755680 1442.521804 60873.130001 316.94
手表 5918214322 4.110140e+09 314736271 2859762 452.717579 66330.304151 109.93
男装 6749788734 4.361552e+10 2513063012 23927509 1530.280202 144268.177525 188.74
group_hyjc20=data_20.groupby("行业简称").sum()
group_hyjc20['销售额']=round(group_hyjc20['销售额'])
group_hyjc20.head()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
行业简称
女装 8676737394 7.745710e+10 9127249618 40820860 1121.539841 244815.524630 87.06
女鞋 5730950460 1.501561e+10 1694251364 10201200 242.586516 40610.243850 32.75
尿片洗护 5622434535 1.363614e+10 993655266 20979655 1330.335817 63129.196749 263.61
手表 6723066330 4.550953e+09 357018767 2659916 599.566828 83288.730439 201.10
男装 7756301279 3.749852e+10 2385366692 22402636 1413.551486 133944.571198 194.04
# fig,(ax1,ax2)=plt.subplots(1,2,figsize=(12,4))
# plt.subplot(121)
# plt.grid()
# plt.scatter(group_hyjc19["访客"],group_hyjc19["销售额"],s=group_hyjc19["销售额"]/150000000
#             ,alpha = 0.4, cmap = 'jet',c=group_hyjc19['访客'])
# # plt.ylim([0,7])
# plt.subplot(122)
# plt.grid()
# plt.scatter(group_hyjc19["访客"],group_hyjc19["销售额"],s=group_hyjc19["销售额"]/170000000
#             ,alpha = 0.4, cmap = 'cool',c=group_hyjc19['访客'])
plt.figure(figsize=(9,7))
plt.grid(".")
for  title,i in zip(["19年","20年"],[group_hyjc19,group_hyjc20]):plt.scatter(i["访客"],i["销售额"],s=i["销售额"]/100000000,alpha = 0.5, cmap = i,label=title,linewidths=0.9,edgecolors="skyblue")
plt.legend()
<matplotlib.legend.Legend at 0![!\[](https://img-blog.csdnimg.cn/20200812093508632.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2d1dWloa24=,size_16,color_FFFFFF,t_70#pic_center)

在这里插入图片描述](https://img-blog.csdnimg.cn/20200812093457824.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2d1dWloa24=,size_16,color_FFFFFF,t_70#pic_center)
x158b2602f28>

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4DQNSvRF-1597195737521)(output_29_1.png)]

import plotly.graph_objects as go
fig=go.Figure(data=[go.Bar(name='2019年',x=group_hyjc20.index.tolist(),y=group_hyjc19.iloc[:,1],hovertext=["女装遥遥领先"],text=group_hyjc19.iloc[:,1],textposition="inside",marker_color='seagreen'),go.Bar(name="2020年",x=group_hyjc20.index.tolist(),y=group_hyjc20.iloc[:,1],text=group_hyjc20.iloc[:,1],marker_color='skyblue', hovertext=['女装遥遥领先', '', '',"","",""],textposition="inside")
])
fig.update_traces(marker_line_color="black",marker_line_width=1.2,opacity=0.9)
fig.update_layout(xaxis_tickangle=50,bargap=0.25,title_text="19-20年前半年的不同行业的销售总额",uniformtext_minsize=8, xaxis_tickfont_size=17,bargroupgap=0.03,yaxis=dict( title='销售金额', titlefont_size=18, tickfont_size=16),xaxis=dict( title='行业类目', titlefont_size=18, tickfont_size=16)
)
fig.show()
        <div id="402d007f-5e16-4bbc-b76a-146b640ea62c" class="plotly-graph-div" style="height:525px; width:100%;"></div><script type="text/javascript">require(["plotly"], function(Plotly) {window.PLOTLYENV=window.PLOTLYENV || {};if (document.getElementById("402d007f-5e16-4bbc-b76a-146b640ea62c")) {Plotly.newPlot('402d007f-5e16-4bbc-b76a-146b640ea62c',[{"hovertext": ["\u5973\u88c5\u9065\u9065\u9886\u5148"], "marker": {"color": "seagreen", "line": {"color": "black", "width": 1.2}}, "name": "2019\u5e74", "opacity": 0.9, "text": [79452642008.0, 14893126630.0, 11562258347.0, 4110139994.0, 43615515942.0, 11071813664.0, 3809851464.0, 17443580327.0, 4796268993.0, 9544811267.0, 33577353044.0, 13852399330.0, 5772844615.0], "textposition": "inside", "type": "bar", "x": ["\u5973\u88c5", "\u5973\u978b", "\u5c3f\u7247\u6d17\u62a4", "\u624b\u8868", "\u7537\u88c5", "\u7537\u978b", "\u773c\u955c", "\u7ae5\u88c5", "\u7ae5\u978b", "\u7bb1\u5305", "\u7f8e\u5bb9\u62a4\u80a4", "\u8fd0\u52a8\u978b", "\u9970\u54c1"], "y": [79452642008.0, 14893126630.0, 11562258347.0, 4110139994.0, 43615515942.0, 11071813664.0, 3809851464.0, 17443580327.0, 4796268993.0, 9544811267.0, 33577353044.0, 13852399330.0, 5772844615.0]}, {"hovertext": ["\u5973\u88c5\u9065\u9065\u9886\u5148", "", "", "", "", ""], "marker": {"color": "skyblue", "line": {"color": "black", "width": 1.2}}, "name": "2020\u5e74", "opacity": 0.9, "text": [77457096041.0, 15015605348.0, 13636142442.0, 4550953223.0, 37498520801.0, 10034843314.0, 438868029.0, 17293683342.0, 2791340549.0, 7691632462.0, 48546266122.0, 16484281636.0, 6571194642.0], "textposition": "inside", "type": "bar", "x": ["\u5973\u88c5", "\u5973\u978b", "\u5c3f\u7247\u6d17\u62a4", "\u624b\u8868", "\u7537\u88c5", "\u7537\u978b", "\u773c\u955c", "\u7ae5\u88c5", "\u7ae5\u978b", "\u7bb1\u5305", "\u7f8e\u5bb9\u62a4\u80a4", "\u8fd0\u52a8\u978b", "\u9970\u54c1"], "y": [77457096041.0, 15015605348.0, 13636142442.0, 4550953223.0, 37498520801.0, 10034843314.0, 438868029.0, 17293683342.0, 2791340549.0, 7691632462.0, 48546266122.0, 16484281636.0, 6571194642.0]}],{"bargap": 0.25, "bargroupgap": 0.03, "template": {"data": {"bar": [{"error_x": {"color": "#2a3f5f"}, "error_y": {"color": "#2a3f5f"}, "marker": {"line": {"color": "#E5ECF6", "width": 0.5}}, "type": "bar"}], "barpolar": [{"marker": {"line": {"color": "#E5ECF6", "width": 0.5}}, "type": "barpolar"}], "carpet": [{"aaxis": {"endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f"}, "baxis": {"endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f"}, "type": "carpet"}], "choropleth": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "choropleth"}], "contour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "contour"}], "contourcarpet": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "contourcarpet"}], "heatmap": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmap"}], "heatmapgl": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmapgl"}], "histogram": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "histogram"}], "histogram2d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2d"}], "histogram2dcontour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2dcontour"}], "mesh3d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "mesh3d"}], "parcoords": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "parcoords"}], "pie": [{"automargin": true, "type": "pie"}], "scatter": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter"}], "scatter3d": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter3d"}], "scattercarpet": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattercarpet"}], "scattergeo": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergeo"}], "scattergl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergl"}], "scattermapbox": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattermapbox"}], "scatterpolar": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolar"}], "scatterpolargl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolargl"}], "scatterternary": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterternary"}], "surface": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "surface"}], "table": [{"cells": {"fill": {"color": "#EBF0F8"}, "line": {"color": "white"}}, "header": {"fill": {"color": "#C8D4E3"}, "line": {"color": "white"}}, "type": "table"}]}, "layout": {"annotationdefaults": {"arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1}, "coloraxis": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "colorscale": {"diverging": [[0, "#8e0152"], [0.1, "#c51b7d"], [0.2, "#de77ae"], [0.3, "#f1b6da"], [0.4, "#fde0ef"], [0.5, "#f7f7f7"], [0.6, "#e6f5d0"], [0.7, "#b8e186"], [0.8, "#7fbc41"], [0.9, "#4d9221"], [1, "#276419"]], "sequential": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "sequentialminus": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]]}, "colorway": ["#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52"], "font": {"color": "#2a3f5f"}, "geo": {"bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white"}, "hoverlabel": {"align": "left"}, "hovermode": "closest", "mapbox": {"style": "light"}, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": {"angularaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "bgcolor": "#E5ECF6", "radialaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}}, "scene": {"xaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}, "yaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}, "zaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}}, "shapedefaults": {"line": {"color": "#2a3f5f"}}, "ternary": {"aaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "baxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "bgcolor": "#E5ECF6", "caxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}}, "title": {"x": 0.05}, "xaxis": {"automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "white", "zerolinewidth": 2}, "yaxis": {"automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "white", "zerolinewidth": 2}}}, "title": {"text": "19-20\u5e74\u524d\u534a\u5e74\u7684\u4e0d\u540c\u884c\u4e1a\u7684\u9500\u552e\u603b\u989d"}, "uniformtext": {"minsize": 8}, "xaxis": {"tickangle": 50, "tickfont": {"size": 16}, "title": {"font": {"size": 18}, "text": "\u884c\u4e1a\u7c7b\u76ee"}}, "yaxis": {"tickfont": {"size": 16}, "title": {"font": {"size": 18}, "text": "\u9500\u552e\u91d1\u989d"}}},{"responsive": true}).then(function(){

var gd = document.getElementById(‘402d007f-5e16-4bbc-b76a-146b640ea62c’);
var x = new MutationObserver(function (mutations, observer) {{
var display = window.getComputedStyle(gd).display;
if (!display || display === ‘none’) {{
console.log([gd, ‘removed!’]);
Plotly.purge(gd);
observer.disconnect();
}}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest(’#notebook-container’);
if (notebookContainer) {{
x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest(’.output’);
if (outputEl) {{
x.observe(outputEl, {childList: true});
}}

                    })};});</script></div>
group_rate_hyjc19=pd.DataFrame(data_19.groupby("行业简称")["支付转化率%"].mean().apply(lambda x : "%.2f%%" % x))
group_rate_hyjc20=pd.DataFrame(data_20.groupby("行业简称")["支付转化率%"].mean().apply(lambda x : "%.2f%%" % x))
group_rate_hyjc19.sort_values(by="支付转化率%",ascending="True").head(5)
支付转化率%
行业简称
女装 0.55%
女鞋 0.87%
男装 1.43%
饰品 1.71%
童装 1.90%
import plotly.graph_objects as go
fig=go.Figure(data=[go.Bar(name="2019年",x=group_rate_hyjc19.index,y=group_rate_hyjc19.iloc[:,0],text=group_rate_hyjc19.iloc[:,0],textposition="outside"),go.Bar(name="2020年",x=group_rate_hyjc20.index,y=group_rate_hyjc20.iloc[:,0],text=group_rate_hyjc20.iloc[:,0],textposition="outside")
])
fig.update_traces(marker_line_color="pink",marker_line_width=1.0,opacity=0.86)
fig.update_layout(xaxis_tickangle=50,bargap=0.25,title_text="19-20年前半年月度不同行业支付转化率",uniformtext_minsize=8, xaxis_tickfont_size=17,bargroupgap=0.03,yaxis=dict( title='销售金额', titlefont_size=15, tickfont_size=17),xaxis=dict( title='行业类目', titlefont_size=15 ,tickfont_size=17),template='plotly_dark')
fig.show()
        <div id="2c2777ab-e6f5-4c32-84dd-8023395d8d22" class="plotly-graph-div" style="height:525px; width:100%;"></div><script type="text/javascript">require(["plotly"], function(Plotly) {window.PLOTLYENV=window.PLOTLYENV || {};if (document.getElementById("2c2777ab-e6f5-4c32-84dd-8023395d8d22")) {Plotly.newPlot('2c2777ab-e6f5-4c32-84dd-8023395d8d22',[{"marker": {"line": {"color": "pink", "width": 1.0}}, "name": "2019\u5e74", "opacity": 0.86, "text": ["0.55%", "0.87%", "3.11%", "2.20%", "1.43%", "1.91%", "4.48%", "1.90%", "2.34%", "2.23%", "2.28%", "2.04%", "1.71%"], "textposition": "outside", "type": "bar", "x": ["\u5973\u88c5", "\u5973\u978b", "\u5c3f\u7247\u6d17\u62a4", "\u624b\u8868", "\u7537\u88c5", "\u7537\u978b", "\u773c\u955c", "\u7ae5\u88c5", "\u7ae5\u978b", "\u7bb1\u5305", "\u7f8e\u5bb9\u62a4\u80a4", "\u8fd0\u52a8\u978b", "\u9970\u54c1"], "y": ["0.55%", "0.87%", "3.11%", "2.20%", "1.43%", "1.91%", "4.48%", "1.90%", "2.34%", "2.23%", "2.28%", "2.04%", "1.71%"]}, {"marker": {"line": {"color": "pink", "width": 1.0}}, "name": "2020\u5e74", "opacity": 0.86, "text": ["0.52%", "0.78%", "2.64%", "3.72%", "1.42%", "1.59%", "4.68%", "1.72%", "1.93%", "2.11%", "3.27%", "1.50%", "1.46%"], "textposition": "outside", "type": "bar", "x": ["\u5973\u88c5", "\u5973\u978b", "\u5c3f\u7247\u6d17\u62a4", "\u624b\u8868", "\u7537\u88c5", "\u7537\u978b", "\u773c\u955c", "\u7ae5\u88c5", "\u7ae5\u978b", "\u7bb1\u5305", "\u7f8e\u5bb9\u62a4\u80a4", "\u8fd0\u52a8\u978b", "\u9970\u54c1"], "y": ["0.52%", "0.78%", "2.64%", "3.72%", "1.42%", "1.59%", "4.68%", "1.72%", "1.93%", "2.11%", "3.27%", "1.50%", "1.46%"]}],{"bargap": 0.25, "bargroupgap": 0.03, "template": {"data": {"bar": [{"error_x": {"color": "#f2f5fa"}, "error_y": {"color": "#f2f5fa"}, "marker": {"line": {"color": "rgb(17,17,17)", "width": 0.5}}, "type": "bar"}], "barpolar": [{"marker": {"line": {"color": "rgb(17,17,17)", "width": 0.5}}, "type": "barpolar"}], "carpet": [{"aaxis": {"endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6"}, "baxis": {"endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6"}, "type": "carpet"}], "choropleth": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "choropleth"}], "contour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "contour"}], "contourcarpet": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "contourcarpet"}], "heatmap": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmap"}], "heatmapgl": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmapgl"}], "histogram": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "histogram"}], "histogram2d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2d"}], "histogram2dcontour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2dcontour"}], "mesh3d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "mesh3d"}], "parcoords": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "parcoords"}], "pie": [{"automargin": true, "type": "pie"}], "scatter": [{"marker": {"line": {"color": "#283442"}}, "type": "scatter"}], "scatter3d": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter3d"}], "scattercarpet": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattercarpet"}], "scattergeo": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergeo"}], "scattergl": [{"marker": {"line": {"color": "#283442"}}, "type": "scattergl"}], "scattermapbox": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattermapbox"}], "scatterpolar": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolar"}], "scatterpolargl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolargl"}], "scatterternary": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterternary"}], "surface": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "surface"}], "table": [{"cells": {"fill": {"color": "#506784"}, "line": {"color": "rgb(17,17,17)"}}, "header": {"fill": {"color": "#2a3f5f"}, "line": {"color": "rgb(17,17,17)"}}, "type": "table"}]}, "layout": {"annotationdefaults": {"arrowcolor": "#f2f5fa", "arrowhead": 0, "arrowwidth": 1}, "coloraxis": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "colorscale": {"diverging": [[0, "#8e0152"], [0.1, "#c51b7d"], [0.2, "#de77ae"], [0.3, "#f1b6da"], [0.4, "#fde0ef"], [0.5, "#f7f7f7"], [0.6, "#e6f5d0"], [0.7, "#b8e186"], [0.8, "#7fbc41"], [0.9, "#4d9221"], [1, "#276419"]], "sequential": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "sequentialminus": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]]}, "colorway": ["#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52"], "font": {"color": "#f2f5fa"}, "geo": {"bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784"}, "hoverlabel": {"align": "left"}, "hovermode": "closest", "mapbox": {"style": "dark"}, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": {"angularaxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}, "bgcolor": "rgb(17,17,17)", "radialaxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}}, "scene": {"xaxis": {"backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3"}, "yaxis": {"backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3"}, "zaxis": {"backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3"}}, "shapedefaults": {"line": {"color": "#f2f5fa"}}, "sliderdefaults": {"bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0}, "ternary": {"aaxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}, "baxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}, "bgcolor": "rgb(17,17,17)", "caxis": {"gridcolor": "#506784", "linecolor": "#506784", "ticks": ""}}, "title": {"x": 0.05}, "updatemenudefaults": {"bgcolor": "#506784", "borderwidth": 0}, "xaxis": {"automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "#283442", "zerolinewidth": 2}, "yaxis": {"automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "#283442", "zerolinewidth": 2}}}, "title": {"text": "19-20\u5e74\u524d\u534a\u5e74\u6708\u5ea6\u4e0d\u540c\u884c\u4e1a\u652f\u4ed8\u8f6c\u5316\u7387"}, "uniformtext": {"minsize": 8}, "xaxis": {"tickangle": 50, "tickfont": {"size": 17}, "title": {"font": {"size": 15}, "text": "\u884c\u4e1a\u7c7b\u76ee"}}, "yaxis": {"tickfont": {"size": 17}, "title": {"font": {"size": 15}, "text": "\u9500\u552e\u91d1\u989d"}}},{"responsive": true}).then(function(){

var gd = document.getElementById(‘2c2777ab-e6f5-4c32-84dd-8023395d8d22’);
var x = new MutationObserver(function (mutations, observer) {{
var display = window.getComputedStyle(gd).display;
if (!display || display === ‘none’) {{
console.log([gd, ‘removed!’]);
Plotly.purge(gd);
observer.disconnect();
}}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest(’#notebook-container’);
if (notebookContainer) {{
x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest(’.output’);
if (outputEl) {{
x.observe(outputEl, {childList: true});
}}

                    })};});</script></div>
group_kedanjia_hyjc19=round(pd.DataFrame(data_19.groupby("行业简称")["客单价"].mean()),2)
group_kedanjia_hyjc20=round(pd.DataFrame(data_20.groupby("行业简称")["客单价"].mean()),2)
group_kedanjia_hyjc19.head(1),group_kedanjia_hyjc20.head(1)
(          客单价行业简称         女装    1611.55,           客单价行业简称         女装    1457.24)
fig=go.Figure(data=[go.Bar(name="2019年",x=group_kedanjia_hyjc19.index,y=group_kedanjia_hyjc19.iloc[:,0],text=group_kedanjia_hyjc19.iloc[:,0],textposition="inside"),go.Bar(name="2020年",x=group_kedanjia_hyjc20.index,y=group_kedanjia_hyjc20.iloc[:,0],text=group_kedanjia_hyjc20.iloc[:,0],textposition="inside")
])
fig.update_traces(marker_line_width=0.5,marker_line_color="cyan")
fig.update_layout(xaxis=dict(title="行业类目",titlefont_size=17,tickfont_size=17),yaxis=dict(title="客单价",titlefont_size=17,tickfont_size=17),bargroupgap=0.01,uniformtext_minsize=8,bargap=0.25,title_text="19-20年前半年月度不同行业客单价")
fig.show()
        <div id="e0c5deb1-dbb5-46bd-a676-f886de3956b4" class="plotly-graph-div" style="height:525px; width:100%;"></div><script type="text/javascript">require(["plotly"], function(Plotly) {window.PLOTLYENV=window.PLOTLYENV || {};if (document.getElementById("e0c5deb1-dbb5-46bd-a676-f886de3956b4")) {Plotly.newPlot('e0c5deb1-dbb5-46bd-a676-f886de3956b4',[{"marker": {"line": {"color": "cyan", "width": 0.5}}, "name": "2019\u5e74", "text": [1611.55, 922.28, 596.8, 1381.88, 1092.94, 810.33, 409.13, 476.1, 313.81, 621.91, null, 938.73, 520.99], "textposition": "inside", "type": "bar", "x": ["\u5973\u88c5", "\u5973\u978b", "\u5c3f\u7247\u6d17\u62a4", "\u624b\u8868", "\u7537\u88c5", "\u7537\u978b", "\u773c\u955c", "\u7ae5\u88c5", "\u7ae5\u978b", "\u7bb1\u5305", "\u7f8e\u5bb9\u62a4\u80a4", "\u8fd0\u52a8\u978b", "\u9970\u54c1"], "y": [1611.55, 922.28, 596.8, 1381.88, 1092.94, 810.33, 409.13, 476.1, 313.81, 621.91, null, 938.73, 520.99]}, {"marker": {"line": {"color": "cyan", "width": 0.5}}, "name": "2020\u5e74", "text": [1457.24, 966.91, 631.29, 1542.38, 984.89, 780.53, 315.77, 452.56, 291.0, 519.91, 968.88, 979.45, 551.09], "textposition": "inside", "type": "bar", "x": ["\u5973\u88c5", "\u5973\u978b", "\u5c3f\u7247\u6d17\u62a4", "\u624b\u8868", "\u7537\u88c5", "\u7537\u978b", "\u773c\u955c", "\u7ae5\u88c5", "\u7ae5\u978b", "\u7bb1\u5305", "\u7f8e\u5bb9\u62a4\u80a4", "\u8fd0\u52a8\u978b", "\u9970\u54c1"], "y": [1457.24, 966.91, 631.29, 1542.38, 984.89, 780.53, 315.77, 452.56, 291.0, 519.91, 968.88, 979.45, 551.09]}],{"bargap": 0.25, "bargroupgap": 0.01, "template": {"data": {"bar": [{"error_x": {"color": "#2a3f5f"}, "error_y": {"color": "#2a3f5f"}, "marker": {"line": {"color": "#E5ECF6", "width": 0.5}}, "type": "bar"}], "barpolar": [{"marker": {"line": {"color": "#E5ECF6", "width": 0.5}}, "type": "barpolar"}], "carpet": [{"aaxis": {"endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f"}, "baxis": {"endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f"}, "type": "carpet"}], "choropleth": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "choropleth"}], "contour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "contour"}], "contourcarpet": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "contourcarpet"}], "heatmap": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmap"}], "heatmapgl": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmapgl"}], "histogram": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "histogram"}], "histogram2d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2d"}], "histogram2dcontour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2dcontour"}], "mesh3d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "mesh3d"}], "parcoords": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "parcoords"}], "pie": [{"automargin": true, "type": "pie"}], "scatter": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter"}], "scatter3d": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter3d"}], "scattercarpet": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattercarpet"}], "scattergeo": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergeo"}], "scattergl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergl"}], "scattermapbox": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattermapbox"}], "scatterpolar": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolar"}], "scatterpolargl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolargl"}], "scatterternary": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterternary"}], "surface": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "surface"}], "table": [{"cells": {"fill": {"color": "#EBF0F8"}, "line": {"color": "white"}}, "header": {"fill": {"color": "#C8D4E3"}, "line": {"color": "white"}}, "type": "table"}]}, "layout": {"annotationdefaults": {"arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1}, "coloraxis": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "colorscale": {"diverging": [[0, "#8e0152"], [0.1, "#c51b7d"], [0.2, "#de77ae"], [0.3, "#f1b6da"], [0.4, "#fde0ef"], [0.5, "#f7f7f7"], [0.6, "#e6f5d0"], [0.7, "#b8e186"], [0.8, "#7fbc41"], [0.9, "#4d9221"], [1, "#276419"]], "sequential": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "sequentialminus": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]]}, "colorway": ["#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52"], "font": {"color": "#2a3f5f"}, "geo": {"bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white"}, "hoverlabel": {"align": "left"}, "hovermode": "closest", "mapbox": {"style": "light"}, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": {"angularaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "bgcolor": "#E5ECF6", "radialaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}}, "scene": {"xaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}, "yaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}, "zaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}}, "shapedefaults": {"line": {"color": "#2a3f5f"}}, "ternary": {"aaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "baxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "bgcolor": "#E5ECF6", "caxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}}, "title": {"x": 0.05}, "xaxis": {"automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "white", "zerolinewidth": 2}, "yaxis": {"automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "white", "zerolinewidth": 2}}}, "title": {"text": "19-20\u5e74\u524d\u534a\u5e74\u6708\u5ea6\u4e0d\u540c\u884c\u4e1a\u5ba2\u5355\u4ef7"}, "uniformtext": {"minsize": 8}, "xaxis": {"tickfont": {"size": 17}, "title": {"font": {"size": 17}, "text": "\u884c\u4e1a\u7c7b\u76ee"}}, "yaxis": {"tickfont": {"size": 17}, "title": {"font": {"size": 17}, "text": "\u5ba2\u5355\u4ef7"}}},{"responsive": true}).then(function(){

var gd = document.getElementById(‘e0c5deb1-dbb5-46bd-a676-f886de3956b4’);
var x = new MutationObserver(function (mutations, observer) {{
var display = window.getComputedStyle(gd).display;
if (!display || display === ‘none’) {{
console.log([gd, ‘removed!’]);
Plotly.purge(gd);
observer.disconnect();
}}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest(’#notebook-container’);
if (notebookContainer) {{
x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest(’.output’);
if (outputEl) {{
x.observe(outputEl, {childList: true});
}}

                    })};});</script></div>

对女装行业进行分析

nvzhuang_data19=data_19[data_19["行业简称"]=="女装"]
nvzhuang_data20=data_20[data_20["行业简称"]=="女装"]
nvzhuang_data19.head()
platform cid industry category themonth 销售额 访客 客群指数 行业简称 年月 uv价值 客单价 支付转化率%
1367 天猫 1623 女装/女士精品 半身裙 2019-01-01 4.466077e+08 59951518 357486 女装 1月 2019年 2019年1月 7.449481 1249.301179 0.60
1368 天猫 50008905 女装/女士精品 皮草 2019-01-01 7.872206e+08 37363055 114703 女装 1月 2019年 2019年1月 21.069493 6863.121392 0.31
1369 天猫 1624 女装/女士精品 套装/学生校服/工作制服 2019-01-01 4.838582e+08 79136374 252168 女装 1月 2019年 2019年1月 6.114232 1918.792915 0.32
1370 天猫 50008906 女装/女士精品 唐装/民族服装/舞台服装 2019-01-01 1.336768e+08 18443417 99300 女装 1月 2019年 2019年1月 7.247941 1346.191324 0.54
1371 天猫 1629 女装/女士精品 大码女装 2019-01-01 2.037671e+08 37338292 166670 女装 1月 2019年 2019年1月 5.457323 1222.578181 0.45
print(nvzhuang_data19.shape,nvzhuang_data20.shape)
(156, 15) (168, 15)
nvzhuang_data19[nvzhuang_data19["category"]=="半身裙"]
platform cid industry category themonth 销售额 访客 客群指数 行业简称 年月 uv价值 客单价 支付转化率%
1367 天猫 1623 女装/女士精品 半身裙 2019-01-01 4.466077e+08 59951518 357486 女装 1月 2019年 2019年1月 7.449481 1249.301179 0.60
1621 天猫 1623 女装/女士精品 半身裙 2019-02-01 2.327357e+08 50756055 224816 女装 2月 2019年 2019年2月 4.585377 1035.227324 0.44
1851 天猫 1623 女装/女士精品 半身裙 2019-03-01 5.420076e+08 69248237 351472 女装 3月 2019年 2019年3月 7.827024 1542.107496 0.51
2079 天猫 1623 女装/女士精品 半身裙 2019-04-01 5.447526e+08 77831735 364783 女装 4月 2019年 2019年4月 6.999107 1493.360782 0.47
2310 天猫 1623 女装/女士精品 半身裙 2019-05-01 5.905490e+08 79853688 374942 女装 5月 2019年 2019年5月 7.395388 1575.040851 0.47
2542 天猫 1623 女装/女士精品 半身裙 2019-06-01 7.536072e+08 79367316 414379 女装 6月 2019年 2019年6月 9.495183 1818.642247 0.52
group_nz19=nvzhuang_data19.groupby("category").mean()
group_nz19.head()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
category
T恤 50000671.0 1.257984e+09 1.203158e+08 718911.000000 9.609703 1608.176865 0.593333
中老年女装 50000852.0 6.886066e+08 3.317840e+07 311193.666667 19.875063 2106.177782 0.928333
半身裙 1623.0 5.183766e+08 6.950142e+07 347979.666667 7.291926 1452.279980 0.501667
卫衣/绒衫 50008898.0 3.197252e+08 5.700351e+07 264378.333333 4.962602 1069.747749 0.451667
唐装/民族服装/舞台服装 50008906.0 1.393532e+08 2.320995e+07 112846.333333 5.929352 1210.526626 0.486667
group_nz20=nvzhuang_data20.groupby("category").mean()
group_nz20.head()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
category
POLO衫 201241307.0 2.166939e+07 1.438497e+07 47115.333333 1.161371 338.881090 0.371667
T恤 50000671.0 1.362343e+09 1.256923e+08 717053.833333 9.856195 1716.703668 0.560000
中老年女装 50000852.0 5.996674e+08 3.963370e+07 299450.666667 14.256378 1865.304094 0.755000
半身裙 1623.0 4.609738e+08 6.400985e+07 301392.500000 6.908628 1465.196673 0.465000
卫衣/绒衫 50008898.0 3.518318e+08 6.216196e+07 278895.833333 5.263823 1153.219017 0.460000
uv_19vs20=pd.merge(left=group_nz19["uv价值"],right=group_nz20["uv价值"],on="category",how="inner")
# uv_19vs20.rename(columns={""})
uv_19vs20.columns=["19年uv价值","20年uv价值"]
uv_19vs20["uv价值变化"]=uv_19vs20['20年uv价值']-uv_19vs20["19年uv价值"]
uv_19vs20.head()
19年uv价值 20年uv价值 uv价值变化
category
T恤 9.609703 9.856195 0.246491
中老年女装 19.875063 14.256378 -5.618685
半身裙 7.291926 6.908628 -0.383299
卫衣/绒衫 4.962602 5.263823 0.301222
唐装/民族服装/舞台服装 5.929352 3.873985 -2.055367
fig=plt.figure()
ax1=fig.add_subplot(111)
uv_19vs20.iloc[:,[0,1]].plot.bar(figsize=(15,6),ax=ax1)
plt.ylabel("uv价值",fontsize=15)
plt.xlabel("二级类目",fontsize=15)
plt.legend(loc=1)
plt.axhline(0,c="skyblue",linestyle="--")ax2=ax1.twinx()
uv_19vs20["uv价值变化"].plot(secondary_y=True,label="uv价值变化",c="skyblue")
plt.legend(loc=9)
plt.axhline(0,linestyle="--",c="royalblue")
<matplotlib.lines.Line2D at 0x158b37e0f98>

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-rGI2fSuT-1597195737524)(out
put_42_1.png)]

rate_19vs20=pd.merge(left=round(group_nz19["支付转化率%"],2),right=round(group_nz20["支付转化率%"],2),on="category",how="inner")
# uv_19vs20.rename(columns={""})
rate_19vs20.columns=["19年支付转化率%","20年支付转化率%"]
rate_19vs20["支付转化率变化率%"]=rate_19vs20['20年支付转化率%']-rate_19vs20["19年支付转化率%"]
rate_19vs20.shape
(26, 3)
# plt.figure(dpi=1000)
# rate_19vs20.iloc[:,[0,1]].plot.bar(figsize=(25,9),width = 0.65,alpha=0.8)
# plt.ylabel("支付转化率",fontsize=20)
# plt.xlabel("二级类目",fontsize=15)
# rate_19vs20['支付转化率变化率%'].plot(secondary_y=True,label="支付转化率变化率",c="deeppink")
# plt.xticks(range(0,26))
# plt.legend(loc=2)
# plt.xticks(rotation=45)
# plt.axhline(0,color='g',linestyle="--",alpha=0.8)
# plt.title("19-20年女装行业下各类目的支付转化率及同比变化率",fontsize=20,pad=30)
fig=plt.figure()
ax1=fig.add_subplot(111)
rate_19vs20.iloc[:,[0,1]].plot.bar(figsize=(15,6),width = 0.65,alpha=0.8,ax=ax1)
plt.ylabel("支付转化率",fontsize=20)
plt.xlabel("二级类目",fontsize=15)
plt.xticks(range(0,26))
plt.legend(loc=1)
plt.xticks(rotation=80,fontsize=13)
plt.title("19-20年女装行业下各类目的支付转化率及同比变化率",fontsize=20,pad=30)ax2=ax1.twinx()
rate_19vs20['支付转化率变化率%'].plot(secondary_y=True,label="支付转化率变化率",c="deeppink")
plt.legend(loc=2)
plt.axhline(0,color='g',linestyle="--",alpha=0.8)
<matplotlib.lines.Line2D at 0x158b39b1f60>

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Em3rneMY-159719在这里
插入图片描述
5737525)(output_45_1.png)]

sales_19vs20=pd.merge(left=group_nz19["销售额"],right=group_nz20["销售额"],on="category",how="inner")
sales_19vs20.columns=["19年销售额","20年销售额"]
pay_19vs20=pd.merge(left=group_nz19["客群指数"],right=group_nz20["客群指数"],on="category",how="inner")
pay_19vs20.columns=["19年支付买家数","20年支付买家数"]
uv_19vs20=pd.merge(left=group_nz19["访客"],right=group_nz20["访客"],on="category",how="inner")
uv_19vs20.columns=["19年访客数","20年访客数"]
kdj_19vs20=pd.merge(left=group_nz19["客单价"],right=group_nz20["客单价"],on="category",how="inner")
kdj_19vs20.columns=["19年客单价","20年客单价"]
fig=plt.figure(figsize=(15,12))
plt.subplots_adjust(hspace=0.5)
ax1=fig.add_subplot(2,2,1)
sales_19vs20.iloc[:,[0,1]].plot.bar(ax=ax1,grid=True)
plt.ylabel("19vs20年销售额",fontsize=13)
# plt.annotate("抹胸的支付转化率最高",xy=(15,100),xytext=(15,100),color="r")
plt.legend(loc=2)ax2=fig.add_subplot(2,2,2)
pay_19vs20.iloc[:,[0,1]].plot(kind="bar",ax=ax2,grid=True)
plt.ylabel("19vs20年支付买家数",fontsize=13)
plt.legend(loc=9)ax3=fig.add_subplot(2,2,3)
uv_19vs20.iloc[:,[0,1]].plot(kind="bar",grid=True,ax=ax3)
plt.ylabel("19vs20年访客数",fontsize=13)ax4=fig.add_subplot(2,2,4)
kdj_19vs20.iloc[:,[0,1]].plot(kind="bar",grid=True,ax=ax4)
plt.ylabel("19vs20年客单价",fontsize=13)
Text(0, 0.5, '19vs20年客单价')

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-lhRZRGtu-1597195737526)(o
utput_47_1.png)]

group_nz_date19=nvzhuang_data19.groupby("月").mean()
group_nz_date20=nvzhuang_data20.groupby("月").mean()
group_nz_date19.head()
cid 销售额 访客 客群指数 uv价值 客单价 支付转化率%
1月 4.013978e+07 6.201391e+08 5.482015e+07 270093.307692 10.184987 2179.636349 0.590385
2月 4.013978e+07 2.647202e+08 4.602366e+07 190040.500000 5.307361 1366.295985 0.501154
3月 4.013978e+07 5.688518e+08 6.068842e+07 294243.576923 8.304510 1755.848036 0.550769
4月 4.013978e+07 4.919570e+08 5.695079e+07 273866.653846 6.779655 1421.688890 0.536538
5月 4.013978e+07 5.075923e+08 5.553469e+07 267777.615385 6.737862 1363.792472 0.532308
sales_nz_date19vs20=pd.merge(group_nz_date19["销售额"],group_nz_date20["销售额"],on="月",how="inner")
sales_nz_date19vs20.columns=["19年女装销售额","20年女装销售额"]
sales_nz_date19vs20["销售额变化率%"]=round(((sales_nz_date19vs20["20年女装销售额"]/sales_nz_date19vs20["19年女装销售额"])-1)*100,2)
sales_nz_date19vs20
19年女装销售额 20年女装销售额 销售额变化率%
1月 6.201391e+08 4.833935e+08 -22.05
2月 2.647202e+08 1.806037e+08 -31.78
3月 5.688518e+08 4.693935e+08 -17.48
4月 4.919570e+08 4.317268e+08 -12.24
5月 5.075923e+08 5.528601e+08 8.92
6月 6.026104e+08 6.483473e+08 7.59
fig=plt.figure(figsize=(10,6))
ax1=fig.add_subplot(111)
sales_nz_date19vs20.iloc[:,[0,1]].plot.bar(ax=ax1,width=0.7)
plt.xticks(rotation=0,fontsize=13,horizontalalignment="left")
plt.legend(loc=2)ax2=ax1.twinx()
sales_nz_date19vs20.iloc[:,2].plot(ax=ax2,color="deeppink",label="销售额变化率")
ax2.legend(bbox_to_anchor=(0.19,0.88))
plt.axhline(0,color='g',linestyle="--",alpha=0.8)
<matplotlib.lines.Line2D at 0x158b41024a8>

[外链图片转存失败,源站可能有防盗
链机制,建议将图片保存下来直接上传(img-pKHWEJrY-1597195737528)(output_50_1.png)]

fig=go.Figure(data=[go.Bar(name="2019年",x=sales_nz_date19vs20.index,y=sales_nz_date19vs20.iloc[:,0],text=sales_nz_date19vs20.iloc[:,0],marker_color="skyblue"),go.Bar(name="2020年",x=sales_nz_date19vs20.index,y=sales_nz_date19vs20.iloc[:,1],text=sales_nz_date19vs20.iloc[:,0],marker_color="deeppink")
])
fig.update_traces(marker_line_color="yellow")
fig.update_layout(title_text="2019-2020年女装行业月度销售额",xaxis=dict(title="月份",titlefont_size=17,tickfont_size=17),yaxis=dict(title="销售额",titlefont_size=17,tickfont_size=17),bargap=0.25)
fig.show()
        <div id="419c9272-615e-4098-992d-a1f67004d2e7" class="plotly-graph-div" style="height:525px; width:100%;"></div><script type="text/javascript">require(["plotly"], function(Plotly) {window.PLOTLYENV=window.PLOTLYENV || {};if (document.getElementById("419c9272-615e-4098-992d-a1f67004d2e7")) {Plotly.newPlot('419c9272-615e-4098-992d-a1f67004d2e7',[{"marker": {"color": "skyblue", "line": {"color": "yellow"}}, "name": "2019\u5e74", "text": [620139125.5723077, 264720194.55461538, 568851762.5388463, 491956992.3761537, 507592336.0873076, 602610435.3265386], "type": "bar", "x": ["1\u6708", "2\u6708", "3\u6708", "4\u6708", "5\u6708", "6\u6708"], "y": [620139125.5723077, 264720194.55461538, 568851762.5388463, 491956992.3761537, 507592336.0873076, 602610435.3265386]}, {"marker": {"color": "deeppink", "line": {"color": "yellow"}}, "name": "2020\u5e74", "text": [620139125.5723077, 264720194.55461538, 568851762.5388463, 491956992.3761537, 507592336.0873076, 602610435.3265386], "type": "bar", "x": ["1\u6708", "2\u6708", "3\u6708", "4\u6708", "5\u6708", "6\u6708"], "y": [483393499.15464294, 180603730.79821426, 469393509.6399999, 431726750.58714294, 552860100.2885715, 648347268.1314285]}],{"bargap": 0.25, "template": {"data": {"bar": [{"error_x": {"color": "#2a3f5f"}, "error_y": {"color": "#2a3f5f"}, "marker": {"line": {"color": "#E5ECF6", "width": 0.5}}, "type": "bar"}], "barpolar": [{"marker": {"line": {"color": "#E5ECF6", "width": 0.5}}, "type": "barpolar"}], "carpet": [{"aaxis": {"endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f"}, "baxis": {"endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f"}, "type": "carpet"}], "choropleth": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "choropleth"}], "contour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "contour"}], "contourcarpet": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "contourcarpet"}], "heatmap": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmap"}], "heatmapgl": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "heatmapgl"}], "histogram": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "histogram"}], "histogram2d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2d"}], "histogram2dcontour": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "histogram2dcontour"}], "mesh3d": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "type": "mesh3d"}], "parcoords": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "parcoords"}], "pie": [{"automargin": true, "type": "pie"}], "scatter": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter"}], "scatter3d": [{"line": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatter3d"}], "scattercarpet": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattercarpet"}], "scattergeo": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergeo"}], "scattergl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattergl"}], "scattermapbox": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scattermapbox"}], "scatterpolar": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolar"}], "scatterpolargl": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterpolargl"}], "scatterternary": [{"marker": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "type": "scatterternary"}], "surface": [{"colorbar": {"outlinewidth": 0, "ticks": ""}, "colorscale": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "type": "surface"}], "table": [{"cells": {"fill": {"color": "#EBF0F8"}, "line": {"color": "white"}}, "header": {"fill": {"color": "#C8D4E3"}, "line": {"color": "white"}}, "type": "table"}]}, "layout": {"annotationdefaults": {"arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1}, "coloraxis": {"colorbar": {"outlinewidth": 0, "ticks": ""}}, "colorscale": {"diverging": [[0, "#8e0152"], [0.1, "#c51b7d"], [0.2, "#de77ae"], [0.3, "#f1b6da"], [0.4, "#fde0ef"], [0.5, "#f7f7f7"], [0.6, "#e6f5d0"], [0.7, "#b8e186"], [0.8, "#7fbc41"], [0.9, "#4d9221"], [1, "#276419"]], "sequential": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]], "sequentialminus": [[0.0, "#0d0887"], [0.1111111111111111, "#46039f"], [0.2222222222222222, "#7201a8"], [0.3333333333333333, "#9c179e"], [0.4444444444444444, "#bd3786"], [0.5555555555555556, "#d8576b"], [0.6666666666666666, "#ed7953"], [0.7777777777777778, "#fb9f3a"], [0.8888888888888888, "#fdca26"], [1.0, "#f0f921"]]}, "colorway": ["#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52"], "font": {"color": "#2a3f5f"}, "geo": {"bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white"}, "hoverlabel": {"align": "left"}, "hovermode": "closest", "mapbox": {"style": "light"}, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": {"angularaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "bgcolor": "#E5ECF6", "radialaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}}, "scene": {"xaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}, "yaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}, "zaxis": {"backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white"}}, "shapedefaults": {"line": {"color": "#2a3f5f"}}, "ternary": {"aaxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "baxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}, "bgcolor": "#E5ECF6", "caxis": {"gridcolor": "white", "linecolor": "white", "ticks": ""}}, "title": {"x": 0.05}, "xaxis": {"automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "white", "zerolinewidth": 2}, "yaxis": {"automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": {"standoff": 15}, "zerolinecolor": "white", "zerolinewidth": 2}}}, "title": {"text": "2019-2020\u5e74\u5973\u88c5\u884c\u4e1a\u6708\u5ea6\u9500\u552e\u989d"}, "xaxis": {"tickfont": {"size": 17}, "title": {"font": {"size": 17}, "text": "\u6708\u4efd"}}, "yaxis": {"tickfont": {"size": 17}, "title": {"font": {"size": 17}, "text": "\u9500\u552e\u989d"}}},{"responsive": true}).then(function(){

var gd = document.getElementById(‘419c9272-615e-4098-992d-a1f67004d2e7’);
var x = new MutationObserver(function (mutations, observer) {{
var display = window.getComputedStyle(gd).display;
if (!display || display === ‘none’) {{
console.log([gd, ‘removed!’]);
Plotly.purge(gd);
observer.disconnect();
}}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest(’#notebook-container’);
if (notebookContainer) {{
x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest(’.output’);
if (outputEl) {{
x.observe(outputEl, {childList: true});
}}

                    })};});</script></div>

19-20年月度行业分析相关推荐

  1. 蓝桥杯 算法训练 - 连续正整数的和 78这个数可以表示为连续正整数的和,1+2+3,18+19+20+21,25+26+27。   输入一个正整数 n(<=10000)   输出 m 行(n有m

    问题描述 78这个数可以表示为连续正整数的和,1+2+3,18+19+20+21,25+26+27. 输入一个正整数 n(<=10000) 输出 m 行(n有m种表示法),每行是两个正整数a,b ...

  2. 没有bug队——加贝——Python 练习实例 19,20

    19.题目: 一个数如果恰好等于它的因子之和,这个数就称为"完数".例如6=1+2+3.编程找出1000以内的所有完数. 程序分析:请参照程序python实例14.我就不在这里过多 ...

  3. C4D R14/15/16/17/18/19/20软件安装包及教程

    软件介绍: 中文名4D电影,外文名CINEMA 4D,研发公司为德国Maxon Computer,特点为极高的运算速度和强大的渲染插件,使用在电影<毁灭战士><阿凡达>中,获得 ...

  4. 小甲鱼python课后习题【16,17,18,19,20】

    [学习笔记,仅供学习交流使用,知识源于鱼c论坛] 作业16: 测试题: 0.我们根据列表.元祖和字符串的共同特点,把它们三统称为什么? 序列   1)都可以通过索引得到每一个元素   2)默认索引值总 ...

  5. python基础编程练习题,Python随笔27:Python基础编程练习题19~20

    注:本文所有代码均经过Python 3.7实际运行检验,保证其严谨性. Python基础练习题19:求连续自然数之和 求三组连续自然数的和:求出1到10.20到30和35到45的三个和. 解答:求的是 ...

  6. JAVA 编写程序实现如下功能:一个线程进行如下运算1*2+2*3+3*4+……+19*20,而另一个线程则每隔一段时间读取前一个线程的运算结果。

    编写程序实现如下功能:一个线程进行如下运算12+23+34+--+1920,而另一个线程则每隔一段时间读取前一个线程的运算结果. class Count{private int sum;Count(i ...

  7. python123阶乘累加_使用多线程计算阶乘累加 1!+2!+3!+...+19!+20!。其中一个线程计算阶乘,另一线程实现累加并输出结果。...

    运用多线程的信号灯法进行边加边计算!代码如下 public class JieChen { public static void main(String args[]){ Sum sum = new ...

  8. PHP笔记 17 18 19 20 21

    目录 自定义函数 参数 函数返回值 PHP变量的范围 局部变量 全局变量 静态变量 参数的传递 按值传递参数 按引用传递参数 函数的默认参数 可变长度参数 可变函数(变量函数) **递归函数** 内部 ...

  9. P18~19~20~21-NPC、道具、背包、装备系统

    基础系统生成过程: 构建文本文件配置表标明数据类型值或字段-->生成协议-->根据配置表字段名一一>对应加载至服务端中-->在消息分发器中添加对应的协议-->利用EF插件 ...

  10. 安东尼罗宾--激发你的无限潜能[连载]--19 20章

    第十九章 快乐富足五要点 "不是环境创造人,而是人创造环境."--狄斯雷利 到目前为止,你已经学到了不少开启自己能力的方法,知道如何掌握人生,迈向成功.不过人生并不是从此一路坦途, ...

最新文章

  1. Brian 的 Perl 问题之万能指南
  2. Python Socket编程基础篇
  3. DeepMind大招,以视觉为媒介,做无监督机器翻译,效果极好
  4. Xilinx DMA kernel 驱动详解 (一)
  5. html文件div盒子浮动,css基础03-盒模型、网站布局思想、浮动以及浮动带来的影响...
  6. 2019牛客暑期多校训练营(第四场)I - String (后缀自动机+回文树)
  7. Linux系统磁状态检测,检测Linux硬件状态
  8. C#3.0语言规范new [Unified C# 3.0 Specification Now Available]
  9. 再次携号转网_陕西通信管理局:对移动公司拒绝对用户提供携号转网服务的违法行为处罚!...
  10. MC音乐网免费解析下载工具 v1.0
  11. 95-910-165-源码-FlinkSQL-Flink SQL 中的时间属性
  12. SQLi LABS Less 10 时间盲注
  13. 如何远程进入linux7.2图形界面,CentOS7.2安装VNC,让Windows远程连接CentOS 7.2 图形化界面...
  14. RMAN数据库恢复 之归档模式有(无)备份-丢失数据文件的恢复
  15. JavaWeb的Servlet、ServletContext
  16. 强连通分量[trajan]
  17. arcgis xml 下载 切片_ArcGIS创建tpk切片缓存
  18. 第四届全国大学生GIS应用技能大赛试题参考答案(上午第2套)
  19. leetcode | 整数反转
  20. Oracle analytics server(OAS) 支持 mysql 社区版配置

热门文章

  1. matlab幅度调制滚动条的程序_利用MATLAB实现信号的幅度调制与解调
  2. 涵盖全网动漫、影视、小说的APP集合,手机有了他们,看遍全网
  3. js 用指定字符分割字符串
  4. Labview双通道虚拟示波器完整程序
  5. Eucalyptus云平台搭建
  6. 【数学-常用公式】基本积分表
  7. win10cmd计算机管理界面,Win10命令提示符cmd在哪 Win10以管理员身份运行方法
  8. [AE] ArcGIS Engine处理Landsat8数据
  9. 如何删除2345浏览器网络导航主页
  10. java怎么查看jar包_怎么查看Jar包源码?如何打开Jar文件?