自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

用Python分析14425條死亡公司數(shù)據(jù) 看十年創(chuàng)業(yè)公司消亡史

開發(fā) 后端
注定不能萬事如意的人生,就不祝你一帆風(fēng)順了。我祝你終會乘風(fēng)破浪,把酒執(zhí)劍,歸來仍是少年。

 一、前言

[[382704]]

IT桔子有一個新經(jīng)濟(jì)死亡公司數(shù)據(jù)庫:https://www.itjuzi.com/deathCompany,統(tǒng)計了2000-2020年之間比較出名的公司 "死亡" 數(shù)據(jù),數(shù)據(jù)來源真實可靠。

圖片 
  • "死亡公司數(shù)據(jù)庫" 的公司關(guān)閉時間是依據(jù)公開媒體報道及部分估算,可能會存在些許誤差,但還是具有較高的可靠性;
  • IT桔子對所收錄公司運營狀況的判定來源如下:1、公開媒體報道公司關(guān)閉、破產(chǎn)清算的;2、公司自身在微信、微博等渠道宣布關(guān)閉、破產(chǎn)清算的;3、公司明顯經(jīng)營異常:公司被注銷;公司產(chǎn)品比如APP或微信持續(xù) 6 個月及以上沒更新;公司因為監(jiān)管被抓、無法經(jīng)營……交叉比對后確認(rèn)沒有持續(xù)經(jīng)營。

二、數(shù)據(jù)預(yù)處理

對已獲取的 14425 條死亡公司數(shù)據(jù)進(jìn)行數(shù)據(jù)查看和預(yù)處理 

  1. import pandas as pd 
  2.  
  3. df = pd.read_excel('倒閉公司數(shù)據(jù).xlsx'
  4. df.head() 

  

  1. df.info() 
  2.  
  3. # 查看公司描述為NAN的這一行 
  4. df[df.isnull().values == True

  

挑選最近十年(2010-2019)的死亡公司數(shù)據(jù),來看一看這十年里,創(chuàng)業(yè)公司的消亡。 

  1. # 提取2010-2019年的死亡公司數(shù)據(jù) 
  2. df1 = df[df['倒閉時間'].str[:4].apply(int) >= 2010] 
  3. df2 = df1[df1['倒閉時間'].str[:4].apply(int) < 2020] 
  4. df2.head() 

   

  1. # 2010-2019 的死亡公司數(shù)據(jù)保存到新的Excel 
  2. df2.to_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'index=False

三、數(shù)據(jù)分析

大家常說 1998 年是中國互聯(lián)網(wǎng)元年,2010年是移動互聯(lián)網(wǎng)的元年。也難怪,2010年的移動互聯(lián)網(wǎng)實在是太熱鬧了。微信、小米、美團(tuán)、愛奇藝等都在這一年相繼成立。百度在谷歌退出中國后成為最大的受益者,淘寶成為阿里新的增長點,騰訊則宣布 QQ 同時在線超 1 億人。自此,百度、阿里和騰訊正式成為"三巨頭"——BAT。除此之外,網(wǎng)易的網(wǎng)游、新浪的微博、搜狐的視頻和輸入法也開始發(fā)力出擊,移動互聯(lián)網(wǎng)的競爭正式拉開帷幕。

pyecharts 繪制折線圖可視化: 

  1. # -*- coding: UTF-8 -*- 
  2. ""
  3. @Author  :葉庭云 
  4. @公眾號  :修煉Python 
  5. @CSDN    :https://yetingyun.blog.csdn.net/ 
  6. ""
  7. import pandas as pd 
  8. import pyecharts.options as opts 
  9. import pyecharts 
  10. from pyecharts.charts import Line 
  11. from pyecharts.globals import CurrentConfig, ThemeType 
  12.  
  13. print(pyecharts.__version__)    # 查看當(dāng)前 pyecharts 版本 
  14. # 引用本地js資源渲染 
  15. CurrentConfig.ONLINE_HOST = 'D:/python/pyecharts-assets-master/assets/' 
  16.  
  17. # 讀取數(shù)據(jù) 
  18. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  19. df1 = df[(df['成立之年'] >= 2010) & (df['成立之年'] < 2020)] 
  20. born_time = df1['成立之年'].value_counts() 
  21. # 按索引  2010-2019排序 
  22. born_time = born_time.sort_index() 
  23. death_time = df['倒閉時間'].str[:4].apply(int).value_counts() 
  24. death_time = death_time.sort_index() 
  25.  
  26. year = [f'{i}年' for i in range(2010, 2020)] 
  27. num_1 = [int(x) for x in born_time.values
  28. num_2 = [int(y) for y in death_time.values
  29.  
  30. c = ( 
  31.     Line(init_opts=opts.InitOpts(theme=ThemeType.DARK)) 
  32.     .add_xaxis(xaxis_data=year
  33.     .set_colors(['#7FFF00''red'])     # 設(shè)置兩條折線圖的顏色 
  34.     .add_yaxis('出生公司數(shù)量', y_axis=num_1) 
  35.     .add_yaxis('死亡公司數(shù)量', y_axis=num_2) 
  36.     .set_global_opts(     # 設(shè)置x軸 y軸標(biāo)簽 
  37.         xaxis_opts=opts.AxisOpts(name='年份'), 
  38.         yaxis_opts=opts.AxisOpts(name='數(shù)量'
  39.     ) 
  40.     .render('test.html'

2010 年來,歷年出生及死亡的公司數(shù)量趨勢如下圖:

 
  • 2014、2015年是公司誕生潮,兩年后,正好對應(yīng)了2016、2017的一波死亡潮。在 2017 年和 2018 年,均超過 2000 家公司倒閉,2019年超過 5000 家公司倒閉。2015年以后,新生創(chuàng)業(yè)公司越來越少,也側(cè)面反應(yīng)了創(chuàng)業(yè)越來越艱難。
  • 在這十年間,諸多 "風(fēng)口" 起起伏伏。網(wǎng)約車、團(tuán)購、直播、基因檢測、共享單車、短視頻、比特幣、VR|AR、無人貨架、人工智能、直播帶貨……

每一個風(fēng)口上,都站著數(shù)百頭 "豬",嘗試飛起來。下面看看各行業(yè)這十年來倒閉公司數(shù)量分布情況。 

  1. # -*- coding: UTF-8 -*- 
  2. ""
  3. @Author  :葉庭云 
  4. @公眾號  :修煉Python 
  5. @CSDN    :https://yetingyun.blog.csdn.net/ 
  6. ""
  7. import pandas as pd 
  8. import matplotlib.pyplot as plt 
  9. import matplotlib as mpl 
  10. import seaborn as sns 
  11.  
  12. # 讀取數(shù)據(jù) 
  13. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  14. df['倒閉之年'] = df['倒閉時間'].str[:4].apply(int
  15. unique()  獲取所屬行業(yè)這一列的唯一值   去重 
  16. datas = list(df['所屬行業(yè)'].unique()) 
  17. print(datas) 
  18. # print(len(datas)) 
  19. for item in datas: 
  20.     # 判斷每行  有這個類型  對應(yīng)類型的列下添個1 
  21.     df[item] = df['所屬行業(yè)'].str.contains(item).apply(lambda x: 1 if x else 0) 
  22.  
  23. industry_data = df.loc[:, datas] 
  24. # 將成立之年作為索引標(biāo)簽 
  25. industry_data.index = df['倒閉之年'
  26. # 將數(shù)據(jù)集按年份分組并求和,得出每個年份,公司所屬各行業(yè)的數(shù)量 
  27. industry_df = industry_data.groupby('倒閉之年').sum() 
  28. # print(industry_df) 
  29. # print(type(industry_df)) 
  30. # industry_df.to_excel('2010-2019年各行業(yè)倒閉公司數(shù)量.xlsx', encoding='gbk'
  31. mpl.rcParams['font.family'] = 'Kaiti' 
  32. fig, ax = plt.subplots(figsize=(15, 9)) 
  33. # 繪制熱力圖    cmap:從數(shù)字到色彩空間的映射 
  34. # PRGn_r  OrRd  rainbow 
  35. sns.heatmap(data=industry_df.T, linewidths=0.25, 
  36.             linecolor='white', ax=ax, annot=True
  37.             fmt='d', cmap='rainbow', robust=True
  38.             ) 
  39.  
  40. # 添加描述信息   x y軸  title 
  41. ax.set_xlabel('年份', fontdict={'size': 18, 'weight''bold'}) 
  42. ax.set_ylabel('公司所屬行業(yè)', fontdict={'size': 18, 'weight''bold'}) 
  43. ax.set_title('2010-2019年各行業(yè)倒閉公司數(shù)量熱力圖', fontsize=25, x=0.5, y=1.02) 
  44.  
  45. # 隱藏邊框 
  46. ax.spines['top'].set_visible(False
  47. ax.spines['right'].set_visible(False
  48. ax.spines['left'].set_visible(False
  49. ax.spines['bottom'].set_visible(False
  50.  
  51. # 保存 展示圖片 
  52. plt.savefig('heat_map.png'
  53. plt.show() 

 

  1. # -*- coding: UTF-8 -*- 
  2. ""
  3. @Author  :葉庭云 
  4. @公眾號  :修煉Python 
  5. @CSDN    :https://yetingyun.blog.csdn.net/ 
  6. ""
  7. import pandas as pd 
  8. import matplotlib.pyplot as plt 
  9. import matplotlib as mpl 
  10. import mplcyberpunk 
  11.  
  12. # 讀取數(shù)據(jù) 
  13. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  14. df['倒閉之年'] = df['倒閉時間'].str[:4].apply(int
  15. unique()  獲取所屬行業(yè)這一列的唯一值   去重 
  16. datas = list(df['所屬行業(yè)'].unique()) 
  17. print(datas) 
  18. # print(len(datas)) 
  19. for item in datas: 
  20.     # 判斷每行  有這個類型  對應(yīng)類型的列下添個1 
  21.     df[item] = df['所屬行業(yè)'].str.contains(item).apply(lambda x: 1 if x else 0) 
  22.  
  23. industry_data = df.loc[:, datas] 
  24. # 將成立之年作為索引標(biāo)簽 
  25. industry_data.index = df['倒閉之年'
  26. # 將數(shù)據(jù)集按年份分組并求和,得出每個年份,公司所屬各行業(yè)的數(shù)量 
  27. industry_df = industry_data.groupby('倒閉之年').sum() 
  28. # print(industry_df) 
  29. # print(type(industry_df)) 
  30. industry_df.T.to_excel('2010-2019年各行業(yè)倒閉公司數(shù)量.xlsx', encoding='gbk'
  31.  
  32. # 使用風(fēng)格樣式  賽博朋克風(fēng)格 
  33. plt.style.use("cyberpunk"
  34. # 設(shè)置中文顯示 
  35. mpl.rcParams['font.family'] = 'SimHei' 
  36. # 設(shè)置大小  像素 
  37. plt.figure(figsize=(10, 6), dpi=100) 
  38.  
  39. # DataFrame 繪制折線圖 
  40. plt.plot(industry_df, label=industry_df.columns) 
  41. # 添加描述信息 
  42. plt.xticks(range(2010, 2020, 1)) 
  43. plt.xlabel('年份', fontsize=12) 
  44. plt.ylabel('倒閉公司數(shù)量', fontsize=12) 
  45. plt.title('2010-2019年各行業(yè)倒閉公司數(shù)量變化趨勢', fontsize=18, x=0.5, y=1.02) 
  46. # 設(shè)置線條發(fā)光+面積圖 
  47. mplcyberpunk.add_glow_effects() 
  48. # 顯示圖例 
  49. plt.legend(industry_df) 
  50. # 保存圖片 
  51. plt.savefig('test_004.png'
  52. # 展示圖片 
  53. plt.show() 

  

  • 這十年來,各行業(yè)倒閉公司數(shù)量變化趨勢大致相似。在2019年,從公司所處行業(yè)來看,倒閉最多的是電子商務(wù),有 675 家;其次是企業(yè)服務(wù),有 665 家;第三是金融,有 624 家;本地生活排第四,有 446 家。
  • 百團(tuán)大戰(zhàn)、垂直電商大戰(zhàn)、外賣大戰(zhàn)、打車大戰(zhàn)、單車大戰(zhàn),在這些著名的戰(zhàn)場里,各種橋段令吃瓜群眾們目不暇接。有老大老二打架,老三打沒了;有老二老三合并,繼續(xù)和老大抗衡的;也有老大老二合并,將其他家遠(yuǎn)遠(yuǎn)甩在后面的……
  • 還有像沖頂大會之類直播答題一樣,辦起來的時候,各家分庭抗禮來勢洶洶,卻從2018年的公歷新年開始,沒有挺到農(nóng)歷新年。

風(fēng)口消亡的背后,是無數(shù)創(chuàng)業(yè)公司燒掉的錢,每個公司在一開始,都堅信可以燒倒對手,但燒著燒著把自己燒光了,卻再也拿不到融資。

圖片 

安邦保險、廣信房產(chǎn)這兩家屬于金融行業(yè)的公司,在燒錢榜上融資總額分別排第一、第二。共享單車們也曾大戰(zhàn)一場,戰(zhàn)火燒過國內(nèi)的各大城市,甚至燒到了海外。摩拜單車在燒錢榜單名列第三,融資總額 327.1596 億元;ofo小黃車緊隨其后,排名第五,融資總額 167.96 億元,摩拜單車存活 5 年 11 個月,ofo小黃車存活 5 年 7 個月。

接著來看看這些倒閉公司的獲投狀態(tài) 

  1. import pandas as pd 
  2. from collections import Counter 
  3.  
  4. # 讀取數(shù)據(jù) 
  5. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  6. data = list(df['獲投狀態(tài)']) 
  7. count = Counter(data).most_common() 
  8. for item in count
  9.     print(item) 

結(jié)果如下: 

  1. # (獲投狀態(tài),倒閉公司數(shù)量) 
  2. ('尚未獲投', 5184) 
  3. ('不明確', 4859) 
  4. ('天使輪', 1898) 
  5. ('A輪', 622) 
  6. ('種子輪', 198) 
  7. ('已被收購', 149) 
  8. ('A+輪', 137) 
  9. ('B輪', 117) 
  10. ('Pre-A輪', 111) 
  11. ('戰(zhàn)略投資', 44) 
  12. ('C輪', 25) 
  13. ('D輪', 10) 
  14. ('B+輪', 9) 
  15. ('新三板', 5) 
  16. ('E輪', 2) 
  17. ('已退市', 2) 
  18. ('C+輪', 1) 
  19. ('已上市', 1) 
  20. ('Pre-B輪', 1) 

超過 10000 家倒閉公司獲投狀態(tài)為尚未獲投、不明確。

創(chuàng)業(yè)公司的消亡,究其原因必然是多方面的,除行業(yè)競爭激烈這一核心因素外,最主要的還是資金問題。創(chuàng)業(yè)者內(nèi)在對于如何維穩(wěn)、如何盈利等方面欠缺的了解、思考與準(zhǔn)備,不足以在行業(yè)穩(wěn)定后,支撐他在風(fēng)口來臨之初的一腔熱血豪情。

圖片 

參考 IT 桔子給的市場定位,分析創(chuàng)業(yè)公司死亡原因。

  1. # -*- coding: UTF-8 -*- 
  2. ""
  3. @Author  :葉庭云 
  4. @公眾號  :修煉Python 
  5. @CSDN    :https://yetingyun.blog.csdn.net/ 
  6. ""
  7. import pandas as pd 
  8. from collections import Counter 
  9. from pyecharts import options as opts 
  10. from pyecharts.charts import Pie 
  11. from pyecharts.globals import CurrentConfig 
  12.  
  13. CurrentConfig.ONLINE_HOST = 'D:/python/pyecharts-assets-master/assets/' 
  14.  
  15. # 讀取數(shù)據(jù) 
  16. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  17. datas = df['倒閉原因'
  18. # 參考IT桔子給的市場定位  創(chuàng)業(yè)公司死亡原因主要的問題 
  19. reason_loaction = {'團(tuán)隊問題': ['創(chuàng)始人問題''與投資人沖突''團(tuán)隊能力不足''團(tuán)隊缺乏激情'], 
  20.                    '產(chǎn)品問題': ['產(chǎn)品缺陷嚴(yán)重''產(chǎn)品入場時機(jī)'], 
  21.                    '資金問題': ['燒錢''現(xiàn)金流斷裂''融資能力不足'], 
  22.                    '運營問題': ['定價/成本問題''營銷不足''不重視客戶''轉(zhuǎn)型問題'], 
  23.                    '外部原因': ['法律法規(guī)風(fēng)險''行業(yè)競爭''政策監(jiān)管'], 
  24.                    '其他問題': ['市場偽需求''商業(yè)模式匱乏''業(yè)務(wù)過于分散''業(yè)務(wù)調(diào)整'
  25.                    } 
  26. reasons_list = [] 
  27. for item in datas: 
  28.     data = item.split('|'
  29.     for i in data: 
  30.         reasons_list.append(i) 
  31.  
  32. reasons_count = Counter(reasons_list).most_common() 
  33. for item in reasons_count: 
  34.     print(item) 
  35. print(len(reasons_count))     # 主要有20種原因 
  36. result = [] 
  37. for key in reason_loaction.keys(): 
  38.     num = 0 
  39.     for i, j in reasons_count: 
  40.         if i in reason_loaction[key]: 
  41.             num += j 
  42.     result.append([key, num]) 
  43.  
  44. print(result) 
  45.  
  46. c = ( 
  47.     # 寬  高  背景顏色 
  48.     Pie(init_opts=opts.InitOpts(width="800px", height="500px", bg_color="#2c343c")) 
  49.     .add
  50.         series_name="倒閉原因",   # 系列名稱 
  51.         data_pair=result,         # 系列數(shù)據(jù)項,格式為 [(key1, value1), (key2, value2)...] 
  52.         rosetype="radius",        # radius:扇區(qū)圓心角展現(xiàn)數(shù)據(jù)的百分比,半徑展現(xiàn)數(shù)據(jù)的大小 
  53.         radius="55%",             # 餅圖的半徑 
  54.         center=["50%""50%"],    # 餅圖的中心(圓心)坐標(biāo),數(shù)組的第一項是橫坐標(biāo),第二項是縱坐標(biāo) 
  55.         label_opts=opts.LabelOpts(is_show=False, position="center"),   # 標(biāo)簽配置項 
  56.     ) 
  57.     .set_colors(["#00BFFF""#00FF7F""#FF1493""#8B008B""#FFFF00""#556B2F"]) 
  58.     .set_global_opts( 
  59.         title_opts=opts.TitleOpts( 
  60.             title="Customized Pie"
  61.             pos_left="center"
  62.             pos_top="20"
  63.             title_textstyle_opts=opts.TextStyleOpts(color="#fff"), 
  64.         ), 
  65.         legend_opts=opts.LegendOpts(is_show=False), 
  66.     ) 
  67.     .set_series_opts( 
  68.         tooltip_opts=opts.TooltipOpts( 
  69.             trigger="item", formatter="{a} <br/>: {c} (k6zqhab033oa%)"  # 'item': 數(shù)據(jù)項圖形觸發(fā),主要在散點圖,餅圖等無類目軸的圖表中使用 
  70.          ), 
  71.         label_opts=opts.LabelOpts(color="#fff"), 
  72.     ) 
  73.     .render("customized_pie.html"

結(jié)果如下: 

  1. ('行業(yè)競爭', 6818) 
  2. ('燒錢', 4963) 
  3. ('融資能力不足', 4655) 
  4. ('營銷不足', 2297) 
  5. ('現(xiàn)金流斷裂', 1802) 
  6. ('商業(yè)模式匱乏', 1490) 
  7. ('政策監(jiān)管', 992) 
  8. ('業(yè)務(wù)過于分散', 990) 
  9. ('產(chǎn)品入場時機(jī)', 917) 
  10. ('法律法規(guī)風(fēng)險', 850) 
  11. ('市場偽需求', 775) 
  12. ('定價/成本問題', 549) 
  13. ('業(yè)務(wù)調(diào)整', 150) 
  14. ('不重視客戶', 101) 
  15. ('產(chǎn)品缺陷嚴(yán)重', 46) 
  16. ('轉(zhuǎn)型問題', 42) 
  17. ('團(tuán)隊能力不足', 42) 
  18. ('創(chuàng)始人問題', 19) 
  19. ('與投資人沖突', 6) 
  20. ('團(tuán)隊缺乏激情', 5) 
  21. 20 
  22. [['團(tuán)隊問題', 72], ['產(chǎn)品問題', 963], ['資金問題', 11420], ['運營問題', 2989], ['外部原因', 8660], ['其他問題', 3405]] 

 圖片 

  • 行業(yè)競爭激烈是核心原因。而從市場定位來看,對于創(chuàng)業(yè)公司,資金問題是主要原因,包括燒錢、現(xiàn)金流斷裂、融資能力不足,其次是外部原因,包括行業(yè)競爭激烈、政策監(jiān)管、法律法規(guī)風(fēng)險。
  • 另外,"偽風(fēng)口" 與 "偽需求" 也曾迷住眾多創(chuàng)業(yè)公司的眼。有的瞄準(zhǔn)的市場過于分散,還未形成市場效應(yīng);有的則沒有解決市場痛點,不痛不癢的創(chuàng)造用戶不需要的需求。"共享經(jīng)濟(jì)" 衍生出的共享單車、共享充電寶紅紅火火,但共享電話、共享廁紙、共享籃球什么的,倒也不必。

比較有意思的是,這個死亡公司數(shù)據(jù)庫還加了一個上香排行榜,排行第一的果然是大名鼎鼎的“快播”。

還真是有的公司死了,但在人們心里它還活著。 

再來看一下創(chuàng)業(yè)公司的地區(qū)分布 

  1. # -*- coding: UTF-8 -*- 
  2. ""
  3. @Author  :葉庭云 
  4. @公眾號  :修煉Python 
  5. @CSDN    :https://yetingyun.blog.csdn.net/ 
  6. ""
  7. import pandas as pd 
  8. from collections import Counter 
  9. from pyecharts.globals import ThemeType, CurrentConfig, GeoType 
  10. from pyecharts import options as opts 
  11. from pyecharts.charts import Geo 
  12.  
  13. CurrentConfig.ONLINE_HOST = 'D:/python/pyecharts-assets-master/assets/' 
  14.  
  15. # 讀取數(shù)據(jù) 
  16. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  17. # 有些數(shù)據(jù)可能多了空格 
  18. area = list(df['所在地區(qū)'].str.strip()) 
  19.  
  20. area_count = Counter(area).most_common() 
  21. # 濾除 
  22. filter_area = [('北美洲', 23), ('亞洲', 11), ('歐洲', 3)] 
  23. area_counts = [item for item in area_count if item not in filter_area] 
  24. for item in area_counts: 
  25.     print(item) 
  26. geo = Geo(init_opts=opts.InitOpts(width='1000px', height='600px', theme=ThemeType.DARK)) 
  27. geo.add_schema(maptype='china', label_opts=opts.LabelOpts(is_show=True))   # 顯示label  省名 
  28. geo.add('倒閉公司數(shù)量', data_pair=area_counts, type_=GeoType.EFFECT_SCATTER, symbol_size=8) 
  29. geo.set_series_opts(label_opts=opts.LabelOpts(is_show=False)) 
  30. geo.set_global_opts(title_opts=opts.TitleOpts(title='倒閉公司數(shù)量在全國的分布'), 
  31.                     visualmap_opts=opts.VisualMapOpts(max_=5000, is_piecewise=True
  32.                     pieces=[{"max": 50, "min": 0, "label""0-50""color""#708090"},        # 分段  添加圖例注釋  和顏色 
  33.                               {"max": 100, "min": 51, "label""51-100""color""#00FFFF"}, 
  34.                               {"max": 200, "min": 101, "label""101-200""color""#00008B"}, 
  35.                               {"max": 300, "min": 201, "label""201-300""color""#483D8B"}, 
  36.                               {"max": 1000, "min": 500, "label""500-1000""color""#1E90FF"}, 
  37.                               {"max": 2000, "min": 1001, "label""1001-2000""color""#8B008B"}, 
  38.                               {"max": 4000, "min": 2001, "label""2001-4000""color""#FF1493"}, 
  39.                               {"max": 5000, "min": 4001, "label""4001-5000""color""#FF0000"
  40.                                  ]) 
  41.                     ) 
  42.  
  43. geo.render("geo_map.html"

 

有個別數(shù)據(jù)地區(qū)是北美洲、亞洲、歐洲這樣的,不便于分析,將其濾掉。 

結(jié)果如下: 

  1. # (地區(qū),倒閉公司數(shù)量) 
  2. ('北京', 4527) 
  3. ('廣東', 2355) 
  4. ('上海', 2000) 
  5. ('浙江', 1007) 
  6. ('四川', 707) 
  7. ('江蘇', 507) 
  8. ('湖北', 302) 
  9. ('福建', 264) 
  10. ('山東', 211) 
  11. ('陜西', 197) 
  12. ('湖南', 155) 
  13. ('重慶', 154) 
  14. ('河南', 125) 
  15. ('安徽', 119) 
  16. ('天津', 110) 
  17. ('遼寧', 98) 
  18. ('河北', 76) 
  19. ('江西', 62) 
  20. ('黑龍江', 53) 
  21. ('廣西', 42) 
  22. ('山西', 36) 
  23. ('臺灣', 36) 
  24. ('云南', 34) 
  25. ('貴州', 32) 
  26. ('海南', 26) 
  27. ('香港', 23) 
  28. ('吉林', 20) 
  29. ('內(nèi)蒙古', 19) 
  30. ('新疆', 16) 
  31. ('甘肅', 11) 
  32. ('寧夏', 7) 
  33. ('西藏', 5) 
  34. ('青海', 2) 

 圖片

北上廣不相信眼淚,但創(chuàng)業(yè)公司還是青睞于北京、廣東、上海等地區(qū)。 

最后看一下倒閉公司經(jīng)營年限分布情況 

  1. # -*- coding: UTF-8 -*- 
  2. ""
  3. @Author  :葉庭云 
  4. @公眾號  :修煉Python 
  5. @CSDN    :https://yetingyun.blog.csdn.net/ 
  6. ""
  7. import pandas as pd 
  8. from collections import Counter 
  9. from pyecharts import options as opts 
  10. from pyecharts.charts import Bar 
  11. from pyecharts.globals import ThemeType, CurrentConfig 
  12.  
  13.  
  14. CurrentConfig.ONLINE_HOST = 'D:/python/pyecharts-assets-master/assets/' 
  15.  
  16. # 讀取數(shù)據(jù) 
  17. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  18.  
  19. year = list(df['經(jīng)營年限']) 
  20. year_count = Counter(year).most_common() 
  21. year_count = sorted(year_count, key=lambda x:x[0]) 
  22. x_data = [x[0] for x in year_count] 
  23. y_data = [y[1] for y in year_count] 
  24. bar = Bar(init_opts=opts.InitOpts(theme=ThemeType.DARK)) 
  25. bar.add_xaxis(xaxis_data=x_data) 
  26. bar.add_yaxis("倒閉公司數(shù)量", y_axis=y_data) 
  27. bar.set_global_opts( 
  28.         title_opts=opts.TitleOpts(title='倒閉公司經(jīng)營年限分布'), 
  29.         xaxis_opts=opts.AxisOpts(name='經(jīng)營年限'),   # 設(shè)置x名稱和Label 
  30.         yaxis_opts=opts.AxisOpts(name='倒閉公司數(shù)量'), 
  31.  
  32.     ) 
  33. bar.render('bar.html'

結(jié)果如下: 

圖片

經(jīng)營年限不足 1 年的公司有 277 家,倒閉公司經(jīng)營年限大部分在 2-4 年,經(jīng)營年限為1年、5年的也比較多,經(jīng)營年限 6 年以上的越來越少。 

經(jīng)營年限最長的倒閉公司Top10: 

  1. import pandas as pd 
  2.  
  3. # 讀取數(shù)據(jù) 
  4. df = pd.read_excel('2010-2019倒閉公司數(shù)據(jù).xlsx'
  5. # 按經(jīng)營年限   降序排列 
  6. df1 = df.sort_values(by='經(jīng)營年限', ascending=False
  7. df1.iloc[:10, ].to_excel('經(jīng)營年限最長的倒閉公司Top10.xlsx'index=False

結(jié)語:這是一個最好的時代,也是一個最壞的時代,一批創(chuàng)業(yè)者正踏上天堂之路,一批創(chuàng)業(yè)者正走向地獄之門,創(chuàng)業(yè)的道路上致使失敗的原因太多,如同蝴蝶效應(yīng)一樣,一個小小的問題,也可能導(dǎo)致最終的失敗。創(chuàng)業(yè)不易,且行且珍惜!

 

責(zé)任編輯:華軒 來源: 修煉Python
相關(guān)推薦

2011-08-23 10:49:44

算法

2009-12-23 09:57:13

十大IT公司

2017-02-09 15:46:09

數(shù)據(jù)分析互聯(lián)網(wǎng)

2018-07-10 10:20:14

2013-07-24 09:20:39

大數(shù)據(jù)創(chuàng)業(yè)公司大數(shù)據(jù)

2017-02-09 17:51:18

數(shù)據(jù)分析數(shù)據(jù)系統(tǒng)互聯(lián)網(wǎng)

2014-04-24 09:41:06

大數(shù)據(jù)

2017-04-06 21:29:58

數(shù)據(jù)分析ELK架構(gòu)

2015-04-30 11:11:47

硅谷動力

2017-04-06 22:15:07

數(shù)據(jù)分析數(shù)據(jù)存儲數(shù)據(jù)倉庫

2017-02-09 15:33:51

數(shù)據(jù)分析采集

2013-01-09 09:57:34

大數(shù)據(jù)分析大數(shù)據(jù)Actuate

2016-05-10 13:55:36

2015-09-06 09:50:59

創(chuàng)業(yè)大數(shù)據(jù)

2014-03-31 10:40:32

移動互聯(lián)網(wǎng)第一代創(chuàng)業(yè)

2012-08-06 09:52:24

2011-03-11 09:19:43

前雇員蘋果

2010-01-11 10:14:21

收購創(chuàng)業(yè)公司思科

2019-08-07 17:25:47

物聯(lián)網(wǎng)企業(yè)初創(chuàng)公司

2017-11-09 13:50:36

數(shù)據(jù)輪數(shù)據(jù)分析
點贊
收藏

51CTO技術(shù)棧公眾號