mns-scheduler 1.1.8.4__py3-none-any.whl → 1.4.5.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mns_scheduler/__init__.py +1 -3
- mns_scheduler/auto_da_ban/auto_da_ban_service.py +89 -0
- mns_scheduler/company_info/clean/__init__.py +1 -1
- mns_scheduler/company_info/clean/company_info_clean_api.py +62 -21
- mns_scheduler/company_info/common/company_common_query_service.py +45 -0
- mns_scheduler/company_info/constant/__init__.py +1 -1
- mns_scheduler/company_info/constant/company_constant_data.py +335 -224
- mns_scheduler/company_info/de_list_stock/__init__.py +1 -1
- mns_scheduler/company_info/de_list_stock/de_list_stock_service.py +1 -1
- mns_scheduler/company_info/em_stock_info/sync_em_stock_info_sync.py +134 -0
- mns_scheduler/company_info/sync/company_info_set_service.py +208 -0
- mns_scheduler/company_info/sync/sync_company_info_task.py +203 -0
- mns_scheduler/company_info/task/company_announce_info_task.py +77 -0
- mns_scheduler/company_info/task/company_base_info_task.py +64 -0
- mns_scheduler/company_info/task/company_business_info_task.py +177 -0
- mns_scheduler/company_info/task/company_hold_info_task.py +66 -0
- mns_scheduler/company_info/task/company_industry_info_task.py +167 -0
- mns_scheduler/company_info/task/company_total_task.py +69 -0
- mns_scheduler/concept/clean/kpl_concept_clean_api.py +1 -1
- mns_scheduler/concept/clean/ths_concept_clean_api.py +20 -4
- mns_scheduler/concept/ths/common/ths_concept_sync_common_api.py +23 -18
- mns_scheduler/concept/ths/common/ths_concept_update_common_api.py +4 -1
- mns_scheduler/concept/ths/detaill/ths_concept_detail_api.py +7 -7
- mns_scheduler/concept/ths/sync_new_index/sync_ths_concept_new_index_api.py +9 -4
- mns_scheduler/concept/ths/update_concept_info/sync_one_symbol_all_concepts_api.py +2 -2
- mns_scheduler/db/col_move_service.py +3 -3
- mns_scheduler/db/script/__init__.py +1 -1
- mns_scheduler/db/script/col_move_script.py +1 -1
- mns_scheduler/db/script/db_move/__init__.py +7 -0
- mns_scheduler/db/script/db_move/col_move_one_service.py +34 -0
- mns_scheduler/db/script/sync/__init__.py +1 -1
- mns_scheduler/db/script/sync/remote_data_sync_to_local.py +65 -4
- mns_scheduler/db/script/sync/sync_hui_ce_test_data.py +80 -0
- mns_scheduler/db/script/sync/sync_hui_ce_test_data_01.py +69 -0
- mns_scheduler/db/script/update/__init__.py +7 -0
- mns_scheduler/db/script/update/update_col_field.py +36 -0
- mns_scheduler/finance/__init__.py +1 -1
- mns_scheduler/finance/em/__init__.py +7 -0
- mns_scheduler/finance/{em_financial_asset_liability_sync_service_api.py → em/em_financial_asset_liability_sync_service_api.py} +2 -2
- mns_scheduler/finance/{em_financial_profit_sync_service_api.py → em/em_financial_profit_sync_service_api.py} +27 -26
- mns_scheduler/finance/{finance_common_api.py → em/finance_common_api.py} +3 -3
- mns_scheduler/finance/{sync_financial_report_service_api.py → sync_financial_report_service_task.py} +80 -27
- mns_scheduler/finance/xue_qiu/__init__.py +7 -0
- mns_scheduler/finance/xue_qiu/down_load_xueqiu_report_api.py +77 -0
- mns_scheduler/finance/xue_qiu/sync_xue_qiu_fiance_data.py +161 -0
- mns_scheduler/hk/__init__.py +1 -1
- mns_scheduler/hk/hk_company_info_sync_service_api.py +4 -4
- mns_scheduler/hk/hk_industry_info_sync_service_api.py +3 -5
- mns_scheduler/industry/__init__.py +7 -0
- mns_scheduler/industry/ths/__init__.py +7 -0
- mns_scheduler/industry/ths/ths_industry_index_service.py +58 -0
- mns_scheduler/industry/ths/ths_industry_sync_service.py +68 -0
- mns_scheduler/irm/__init__.py +1 -1
- mns_scheduler/irm/api/__init__.py +1 -1
- mns_scheduler/irm/api/sh_stock_sns_sse_info_api.py +8 -58
- mns_scheduler/irm/api/sz_stock_sns_sse_info_api.py +15 -26
- mns_scheduler/irm/stock_irm_cninfo_service.py +43 -31
- mns_scheduler/irm/stock_question_id_service.py +169 -0
- mns_scheduler/k_line/clean/daily/__init__.py +1 -1
- mns_scheduler/k_line/clean/daily/daily_k_line_clean_common_service.py +52 -6
- mns_scheduler/k_line/clean/daily/daily_k_line_service.py +7 -2
- mns_scheduler/k_line/clean/k_line_info_clean_impl.py +3 -2
- mns_scheduler/k_line/clean/k_line_info_clean_task.py +42 -15
- mns_scheduler/k_line/clean/week_month/__init__.py +1 -1
- mns_scheduler/k_line/clean/week_month/normal_week_month_k_line_service.py +124 -26
- mns_scheduler/k_line/clean/week_month/sub_new_week_month_k_line_service.py +2 -2
- mns_scheduler/k_line/common/__init__.py +7 -0
- mns_scheduler/k_line/common/k_line_common_api.py +188 -0
- mns_scheduler/k_line/hot_stocks/__init__.py +1 -1
- mns_scheduler/k_line/hot_stocks/recent_hot_stocks_clean_service.py +1 -1
- mns_scheduler/k_line/{sync → month_week_daily}/bfq_k_line_sync.py +14 -29
- mns_scheduler/k_line/{sync → month_week_daily}/daily_week_month_line_sync.py +11 -12
- mns_scheduler/k_line/sync_status/__init__.py +7 -0
- mns_scheduler/k_line/sync_status/k_line_sync_status_check.py +54 -0
- mns_scheduler/k_line/test/__init__.py +1 -1
- mns_scheduler/k_line/test/k_line_info_clean_his_data.py +14 -3
- mns_scheduler/k_line/year_quarter/__init__.py +7 -0
- mns_scheduler/k_line/year_quarter/year_quarter_line_sync.py +76 -0
- mns_scheduler/kpl/selection/symbol/sync_best_choose_symbol.py +1 -2
- mns_scheduler/kpl/selection/symbol/sync_kpl_concept_symbol_choose_reason_api.py +108 -0
- mns_scheduler/kpl/selection/total/sync_kpl_best_total_sync_api.py +5 -0
- mns_scheduler/lhb/__init__.py +1 -1
- mns_scheduler/lhb/stock_lhb_sync_service.py +1 -1
- mns_scheduler/open/__init__.py +1 -1
- mns_scheduler/open/sync_one_day_open_data_to_db_service.py +2 -3
- mns_scheduler/risk/__init__.py +1 -1
- mns_scheduler/risk/compliance/undisclosed_annual_report_api.py +8 -2
- mns_scheduler/risk/financial/annual_report_audit_check_api.py +13 -3
- mns_scheduler/risk/financial/net_assets_check_api.py +21 -18
- mns_scheduler/risk/financial/profit_income_check_api.py +7 -2
- mns_scheduler/risk/financial_report_risk_check_api.py +1 -1
- mns_scheduler/risk/major_violations/register_and_investigate_stock_sync_api.py +1 -1
- mns_scheduler/risk/self/wei_pan_stock_api.py +1 -1
- mns_scheduler/risk/test/__init__.py +1 -1
- mns_scheduler/risk/test/fix_blask_list.py +4 -6
- mns_scheduler/risk/transactions/transactions_check_api.py +22 -4
- mns_scheduler/self_choose/__init__.py +1 -1
- mns_scheduler/self_choose/ths_self_choose_service.py +99 -43
- mns_scheduler/trade/auto_login/trader_auto_service.py +7 -4
- mns_scheduler/trade/auto_sell_service_api.py +4 -4
- mns_scheduler/trade/balance/__init__.py +7 -0
- mns_scheduler/trade/balance/ths_account_balance_service.py +7 -0
- mns_scheduler/trade/sync_position_api.py +39 -6
- mns_scheduler/trade/task/trader_task_service.py +38 -10
- mns_scheduler/trade/tfp/__init__.py +7 -0
- mns_scheduler/trade/tfp/stock_tfp_info_sync.py +56 -0
- mns_scheduler/zb/stock_zb_pool_sync.py +1 -16
- mns_scheduler/zt/high_chg/sync_high_chg_pool_service.py +2 -2
- mns_scheduler/zt/high_chg/sync_high_chg_real_time_quotes_service.py +1 -1
- mns_scheduler/zt/script/__init__.py +1 -1
- mns_scheduler/zt/script/fix_error_deal_day.py +41 -0
- mns_scheduler/zt/script/kcx_high_chg_open_his_data_handle.py +2 -2
- mns_scheduler/zt/script/sync_high_chg_pool_his_data.py +2 -2
- mns_scheduler/zt/script/sync_now_higt_chg_zt.py +8 -7
- mns_scheduler/zt/zt_pool/em_zt_pool_sync_api.py +260 -83
- mns_scheduler/zt/zt_pool/ths_zt_pool_sync_api.py +33 -90
- mns_scheduler/zt/zt_pool/update_null_zt_reason_api.py +27 -13
- mns_scheduler/zz_task/compensation/__init__.py +0 -0
- mns_scheduler/zz_task/compensation/compensate_task.py +161 -0
- mns_scheduler/zz_task/compensation/compensate_task_one_day.py +142 -0
- mns_scheduler/zz_task/data_sync_task.py +197 -103
- {mns_scheduler-1.1.8.4.dist-info → mns_scheduler-1.4.5.7.dist-info}/METADATA +1 -1
- mns_scheduler-1.4.5.7.dist-info/RECORD +176 -0
- {mns_scheduler-1.1.8.4.dist-info → mns_scheduler-1.4.5.7.dist-info}/WHEEL +1 -1
- mns_scheduler/2014-2015-test/2014_2015_chg_statistics.py +0 -87
- mns_scheduler/big_deal/ths_big_deal_sync.py +0 -98
- mns_scheduler/company_info/base/sync_company_base_info_api.py +0 -439
- mns_scheduler/company_info/base/sync_company_hold_info_api.py +0 -40
- mns_scheduler/company_info/remark/company_remark_info_sync.py +0 -46
- mns_scheduler/db/real_time_task_check.py +0 -84
- mns_scheduler/debt/kzz_bond_info_sync.py +0 -33
- mns_scheduler-1.1.8.4.dist-info/RECORD +0 -142
- /mns_scheduler/{2014-2015-test → auto_da_ban}/__init__.py +0 -0
- /mns_scheduler/company_info/{base → common}/__init__.py +0 -0
- /mns_scheduler/{big_deal → company_info/em_stock_info}/__init__.py +0 -0
- /mns_scheduler/company_info/{remark → sync}/__init__.py +0 -0
- /mns_scheduler/{debt → company_info/task}/__init__.py +0 -0
- /mns_scheduler/k_line/{sync → month_week_daily}/__init__.py +0 -0
- {mns_scheduler-1.1.8.4.dist-info → mns_scheduler-1.4.5.7.dist-info}/top_level.txt +0 -0
|
@@ -14,203 +14,121 @@ mongodb_util = MongodbUtil('27017')
|
|
|
14
14
|
|
|
15
15
|
# 修改行业分类的股票
|
|
16
16
|
def get_fix_symbol_industry():
|
|
17
|
-
return pd.DataFrame([['688480', '赛恩斯', '760103', '环境治理'],
|
|
18
|
-
['000032', '深桑达A', '730204', '通信网络设备及器件'],
|
|
19
|
-
['688480', '赛恩斯', '640704', '自动化设备'],
|
|
20
|
-
['603260', '合盛硅业', '220316', '有机硅'],
|
|
21
|
-
['300559', '佳发教育', '461102', '培训教育'],
|
|
22
|
-
['300836', '佰奥智能', '640701', '机器人'],
|
|
23
|
-
['300293', '蓝英装备', '640701', '机器人'],
|
|
24
|
-
['688630', '芯碁微装', '270108', '半导体设备'],
|
|
25
|
-
['001309', '德明利', '270104', '数字芯片设计'],
|
|
26
|
-
['600338', '西藏珠峰', '240603', '锂'],
|
|
27
|
-
['300042', '朗科科技', '270108', '半导体设备'],
|
|
28
|
-
['688507', '索辰科技', '710402', '横向通用软件'],
|
|
29
|
-
['301387', '光大同创', '270504', '消费电子零部件及组装'],
|
|
30
|
-
['300295', '三六五网', '430301', '物业管理'],
|
|
31
|
-
['300947', '德必集团', '430301', '物业管理'],
|
|
32
|
-
['300483', '首华燃气', '410301', '燃气Ⅲ'],
|
|
33
|
-
['300215', '电科院', '410110', '电能综合服务'],
|
|
34
|
-
# 持有上海微电子装备有限公司10%的股份 国产光刻机 主要炒作在芯片概念 不在房地产
|
|
35
|
-
['600895', '张江高科', '270108', '半导体设备'],
|
|
36
|
-
['301112', '信邦智能', '640704', '其他自动化设备'],
|
|
37
|
-
['002693', '双成药业', '270104', '数字芯片设计'],
|
|
38
|
-
['000670', '盈方微', '270401', '其他电子'],
|
|
39
|
-
['300803', '指南针', '490101', '证券'],
|
|
40
|
-
['300085', '银之杰', '490101', '证券'],
|
|
41
|
-
['300380', '安硕信息', '490101', '证券'],
|
|
42
|
-
['600446', '金证股份', '490101', '证券'],
|
|
43
|
-
['688318', '财富趋势', '490101', '证券'],
|
|
44
|
-
['600570', '恒生电子', '490101', '证券'],
|
|
45
|
-
['837592', '华信永道', '490101', '证券'],
|
|
46
|
-
['830799', '艾融软件', '490101', '证券'],
|
|
47
|
-
['300033', '同花顺', '490101', '证券'],
|
|
48
|
-
['300399', '天利科技', '490201', '保险'],
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],
|
|
52
|
-
columns=['symbol', 'name', 'new_industry_code', 'new_industry'])
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def get_industry_final_fix_df():
|
|
56
17
|
return pd.DataFrame([
|
|
57
|
-
|
|
58
|
-
['汽车零部件', '汽车零部件'],
|
|
59
|
-
['汽车服务', '汽车服务'],
|
|
60
|
-
['乘用车', '汽车整车'], # = merge 汽车整车
|
|
61
|
-
['商用车', '汽车整车'],
|
|
18
|
+
['688480', '赛恩斯', '760103', '环境治理'],
|
|
62
19
|
|
|
63
|
-
|
|
64
|
-
['
|
|
65
|
-
['生物制品', '生物制品'],
|
|
66
|
-
['中药Ⅱ', '中药'],
|
|
67
|
-
['医疗器械', '医疗器械'],
|
|
68
|
-
['医疗服务', '医疗服务'],
|
|
69
|
-
['医药商业', '医药商业'],
|
|
20
|
+
['603260', '合盛硅业', '220316', '有机硅'],
|
|
21
|
+
['300559', '佳发教育', '461102', '培训教育'],
|
|
70
22
|
|
|
71
|
-
|
|
72
|
-
['电网设备', '电网设备'],
|
|
73
|
-
['电池', '电池'],
|
|
74
|
-
['电机Ⅱ', '电机'], #
|
|
75
|
-
['光伏设备', '光伏设备'],
|
|
76
|
-
['风电设备', '风电设备'],
|
|
77
|
-
['其他电源设备Ⅱ', '其他电源设备'],
|
|
23
|
+
['600338', '西藏珠峰', '240303', '铅锌'],
|
|
78
24
|
|
|
79
|
-
|
|
80
|
-
['
|
|
81
|
-
['
|
|
25
|
+
['688507', '索辰科技', '710402', '横向通用软件'],
|
|
26
|
+
['301387', '光大同创', '270504', '消费电子零部件及组装'],
|
|
27
|
+
['300295', '三六五网', '430301', '物业管理'],
|
|
28
|
+
['300947', '德必集团', '430301', '物业管理'],
|
|
29
|
+
['300483', '首华燃气', '410301', '燃气Ⅲ'],
|
|
30
|
+
['300215', '电科院', '410110', '电能综合服务'],
|
|
31
|
+
# 持有上海微电子装备有限公司10%的股份 国产光刻机 主要炒作在芯片概念 不在房地产
|
|
82
32
|
|
|
83
|
-
|
|
84
|
-
['
|
|
85
|
-
['
|
|
86
|
-
['软件开发', '软件开发'],
|
|
33
|
+
['300836', '佰奥智能', '640701', '机器人'],
|
|
34
|
+
['300293', '蓝英装备', '640701', '机器人'],
|
|
35
|
+
['301112', '信邦智能', '640704', '其他自动化设备'],
|
|
87
36
|
|
|
88
|
-
# 环保
|
|
89
|
-
['环境治理', '环保'], # merge, 环保
|
|
90
|
-
['环保设备Ⅱ', '环保'], # merge '环保'
|
|
91
37
|
|
|
92
|
-
# 电子
|
|
93
|
-
['半导体', '半导体'],
|
|
94
|
-
['电子化学品Ⅱ', '电子化学品'],
|
|
95
|
-
['光学光电子', '光学光电子'],
|
|
96
|
-
['消费电子', '消费电子'],
|
|
97
|
-
['元件', '元件'],
|
|
98
|
-
['其他电子Ⅱ', '其他电子'], #
|
|
99
38
|
|
|
100
|
-
|
|
101
|
-
['军工电子Ⅱ', '军工电子'], # todo merge 国防
|
|
102
|
-
['地面兵装Ⅱ', '地面兵装'], # todo merge 国防
|
|
103
|
-
['航天装备Ⅱ', '航天装备'],
|
|
104
|
-
['航空装备Ⅱ', '航空装备'], # todo merge 国防
|
|
105
|
-
['航海装备Ⅱ', '航海装备'],
|
|
39
|
+
['000670', '盈方微', '270401', '其他电子'],
|
|
106
40
|
|
|
107
|
-
|
|
108
|
-
['
|
|
109
|
-
['
|
|
110
|
-
['
|
|
111
|
-
['
|
|
112
|
-
['
|
|
113
|
-
['
|
|
114
|
-
['
|
|
41
|
+
['300803', '指南针', '490101', '证券'],
|
|
42
|
+
['300085', '银之杰', '490101', '证券'],
|
|
43
|
+
['300380', '安硕信息', '490101', '证券'],
|
|
44
|
+
['600446', '金证股份', '490101', '证券'],
|
|
45
|
+
['688318', '财富趋势', '490101', '证券'],
|
|
46
|
+
['600570', '恒生电子', '490101', '证券'],
|
|
47
|
+
['837592', '华信永道', '490101', '证券'],
|
|
48
|
+
['830799', '艾融软件', '490101', '证券'],
|
|
49
|
+
['300033', '同花顺', '490101', '证券'],
|
|
50
|
+
['300399', '天利科技', '490201', '保险'],
|
|
115
51
|
|
|
116
|
-
|
|
117
|
-
['通信服务', '通信服务'],
|
|
118
|
-
['通信设备', '通信设备'],
|
|
52
|
+
['002131', '利欧股份', '720501', '营销代理'],
|
|
119
53
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
['
|
|
54
|
+
['300042', '朗科科技', '270108', '半导体设备'],
|
|
55
|
+
# EDA软件
|
|
56
|
+
['301269', '华大九天', '270108', '半导体设备'],
|
|
57
|
+
['688206', '概伦电子', '270108', '半导体设备'],
|
|
58
|
+
['301095', '广立微', '270108', '半导体设备'],
|
|
59
|
+
['600895', '张江高科', '270108', '半导体设备'],
|
|
123
60
|
|
|
124
|
-
|
|
125
|
-
['
|
|
126
|
-
['
|
|
127
|
-
['文娱用品', '文娱用品'], #
|
|
128
|
-
['家居用品', '家居用品'],
|
|
61
|
+
['688630', '芯碁微装', '270108', '半导体设备'],
|
|
62
|
+
['001309', '德明利', '270104', '数字芯片设计'],
|
|
63
|
+
['688795', '摩尔线程', '270104', '数字芯片设计'],
|
|
129
64
|
|
|
130
|
-
|
|
131
|
-
['
|
|
132
|
-
|
|
133
|
-
|
|
65
|
+
],
|
|
66
|
+
columns=['symbol',
|
|
67
|
+
'name',
|
|
68
|
+
'new_industry_code', # 三级行业代码
|
|
69
|
+
'new_industry'])
|
|
134
70
|
|
|
135
|
-
# 美容护理
|
|
136
|
-
['化妆品', '美容护理'], # merge to 美容护理
|
|
137
|
-
['医疗美容', '美容护理'], # merge 美容护理
|
|
138
|
-
['个护用品', '个护用品'],
|
|
139
71
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
['
|
|
144
|
-
['休闲食品', '休闲食品'], # merge '食品饮料'
|
|
72
|
+
# 修改二级行业分类的股票
|
|
73
|
+
def get_fix_second_industry_info():
|
|
74
|
+
return pd.DataFrame([
|
|
75
|
+
['110200', '渔业', "农林牧渔", "110000", '农业综合Ⅱ', '110900'],
|
|
145
76
|
|
|
146
|
-
|
|
147
|
-
['炼化及贸易', '石油行业'], # merge 石油行业
|
|
148
|
-
['油服工程', '采掘行业'], # merge '采掘行业'
|
|
149
|
-
['油气开采Ⅱ', '石油行业'], # merge to 石油行业
|
|
77
|
+
['110300', '林业', "农林牧渔", "110000", '农业综合Ⅱ', '110900'],
|
|
150
78
|
|
|
151
|
-
|
|
152
|
-
['普钢', '钢铁'], # merge 钢铁
|
|
153
|
-
['特钢Ⅱ', '钢铁'], # merge '钢铁'
|
|
154
|
-
['冶钢原料', '钢铁'], # merge to 钢铁
|
|
79
|
+
['450700', '旅游零售Ⅱ', '社会服务', '460000', '旅游及景区', '461000'],
|
|
155
80
|
|
|
156
|
-
|
|
157
|
-
['能源金属', '能源金属'], # merge
|
|
158
|
-
['小金属', '小金属'],
|
|
159
|
-
['贵金属', '贵金属'], #
|
|
160
|
-
['金属新材料', '金属新材料'],
|
|
161
|
-
# 铅锌 铝 铜
|
|
162
|
-
['工业金属', '工业金属'],
|
|
81
|
+
['220700', '化工新材料Ⅱ', '基础化工', '220000', '非金属材料Ⅱ', '220900'],
|
|
163
82
|
|
|
164
|
-
|
|
165
|
-
['基础建设', '工程建设'],
|
|
166
|
-
['房屋建设Ⅱ', '工程建设'], # merge 工程建设
|
|
167
|
-
['工程咨询服务Ⅱ', '工程咨询服务'],
|
|
168
|
-
['专业工程', '建筑工程'],
|
|
169
|
-
['装修装饰Ⅱ', '装修装饰'],
|
|
170
|
-
['工程机械', '工程机械'],
|
|
83
|
+
['330700', '其他家电Ⅱ', '家用电器', '330000', '小家电', '330300'],
|
|
171
84
|
|
|
172
|
-
|
|
173
|
-
['装修建材', '装修建材'], #
|
|
174
|
-
['建筑建材', '装修建材'], #
|
|
175
|
-
['玻璃玻纤', '玻璃玻纤'],
|
|
176
|
-
['水泥', '水泥'],
|
|
85
|
+
['250100', '建筑材料', '建筑材料', '610000', '装修建材', '610300'],
|
|
177
86
|
|
|
178
|
-
|
|
179
|
-
['白色家电', '家用电器'], # merge 家用电器
|
|
180
|
-
['照明设备Ⅱ', '家用电器'], # merge 家用电器
|
|
181
|
-
['其他家电Ⅱ', '家用电器'], # merge 家用电器
|
|
182
|
-
['家电零部件Ⅱ', '家用电器'], # merge 家用电器
|
|
183
|
-
['小家电', '家用电器'], # merge '家用电器'
|
|
184
|
-
['黑色家电', '家用电器'], # merge 家用电器
|
|
185
|
-
['厨卫电器', '家用电器'], # merge 家用电器
|
|
87
|
+
['460600', '体育Ⅱ', '综合', '510000', '综合Ⅱ', '510100'],
|
|
186
88
|
|
|
187
|
-
|
|
188
|
-
['化学制品', '化学制品'],
|
|
189
|
-
['化学原料', '化学原料'],
|
|
190
|
-
['化学纤维', '化学纤维'],
|
|
191
|
-
['农化制品', '化肥农药'],
|
|
192
|
-
['塑料', '塑料'],
|
|
193
|
-
['橡胶', '橡胶'], # todo exclude
|
|
194
|
-
['非金属材料Ⅱ', '非金属材料'],
|
|
89
|
+
['770300', '医疗美容', '美容护理', '770000', '化妆品', '770200'],
|
|
195
90
|
|
|
196
|
-
|
|
197
|
-
['
|
|
198
|
-
|
|
199
|
-
|
|
91
|
+
],
|
|
92
|
+
columns=['original_second_industry_code',
|
|
93
|
+
'original_second_industry_name',
|
|
94
|
+
'first_sw_industry',
|
|
95
|
+
'first_industry_code',
|
|
96
|
+
'second_sw_industry', # 二级级行业代码
|
|
97
|
+
'second_industry_code'])
|
|
200
98
|
|
|
201
|
-
# 农林牧渔
|
|
202
|
-
['养殖业', '农林牧渔'], # merge 农林牧渔
|
|
203
|
-
['农产品加工', '农林牧渔'], # merge 农林牧渔
|
|
204
|
-
['饲料', '农林牧渔'], # merge to 饲料
|
|
205
|
-
['渔业', '农林牧渔'], # merge to 渔业
|
|
206
|
-
['种植业', '种植业'], # merge 种植业
|
|
207
|
-
['动物保健Ⅱ', '动物保健'], # todo exclude
|
|
208
99
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
100
|
+
def fix_second_industry(company_info):
|
|
101
|
+
fix_second_industry_df = get_fix_second_industry_info()
|
|
102
|
+
del fix_second_industry_df['original_second_industry_name']
|
|
103
|
+
fix_second_company_df = company_info.loc[
|
|
104
|
+
company_info['second_industry_code'].isin(fix_second_industry_df['original_second_industry_code'])]
|
|
105
|
+
|
|
106
|
+
no_fix_second_company_df = company_info.loc[~(
|
|
107
|
+
company_info['second_industry_code'].isin(fix_second_industry_df['original_second_industry_code']))]
|
|
108
|
+
|
|
109
|
+
fix_second_company_df = fix_second_company_df.set_index(['second_industry_code'], drop=True)
|
|
110
|
+
del fix_second_company_df['second_sw_industry']
|
|
111
|
+
del fix_second_company_df['first_industry_code']
|
|
112
|
+
del fix_second_company_df['first_sw_industry']
|
|
113
|
+
fix_second_industry_df = fix_second_industry_df.set_index(['original_second_industry_code'], drop=True)
|
|
114
|
+
|
|
115
|
+
fix_second_company_df = pd.merge(fix_second_company_df, fix_second_industry_df, how='outer',
|
|
116
|
+
left_index=True, right_index=True)
|
|
212
117
|
|
|
213
|
-
|
|
118
|
+
return pd.concat([no_fix_second_company_df, fix_second_company_df])
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# 修改行业名
|
|
122
|
+
def get_fix_industry_name_df():
|
|
123
|
+
return pd.DataFrame([
|
|
124
|
+
|
|
125
|
+
# 交通运输 1
|
|
126
|
+
['物流', '物流'],
|
|
127
|
+
['铁路公路', '铁路公路'],
|
|
128
|
+
['航运港口', '航运港口'],
|
|
129
|
+
['航空机场', '航空机场'],
|
|
130
|
+
|
|
131
|
+
# 传媒 2
|
|
214
132
|
['数字媒体', '数字媒体'],
|
|
215
133
|
['电视广播Ⅱ', '电视广播'],
|
|
216
134
|
['游戏Ⅱ', '游戏'],
|
|
@@ -218,72 +136,260 @@ def get_industry_final_fix_df():
|
|
|
218
136
|
['影视院线', '影视院线'],
|
|
219
137
|
['广告营销', '广告营销'],
|
|
220
138
|
|
|
221
|
-
#
|
|
222
|
-
['
|
|
223
|
-
['
|
|
224
|
-
['航运港口', '航运港口'],
|
|
225
|
-
['航空机场', '航空机场'],
|
|
139
|
+
# 公用事业 3
|
|
140
|
+
['燃气Ⅱ', '燃气'],
|
|
141
|
+
['电力', '电力'],
|
|
226
142
|
|
|
227
|
-
#
|
|
228
|
-
['
|
|
229
|
-
['
|
|
230
|
-
['
|
|
143
|
+
# 农林牧渔 4
|
|
144
|
+
['养殖业', '养殖业'],
|
|
145
|
+
['农产品加工', '农产品加工'],
|
|
146
|
+
['饲料', '饲料'],
|
|
147
|
+
['渔业', '渔业'], # merge to 农业综合
|
|
148
|
+
['动物保健Ⅱ', '动物保健'],
|
|
149
|
+
['种植业', '种植业'],
|
|
150
|
+
# ['林业Ⅱ', '林业'], # merge 农业综合
|
|
151
|
+
['农业综合Ⅱ', '农业综合'], #
|
|
152
|
+
|
|
153
|
+
# 医药生物 5
|
|
154
|
+
['化学制药', '化学制药'],
|
|
155
|
+
['生物制品', '生物制品'],
|
|
156
|
+
['中药Ⅱ', '中药'],
|
|
157
|
+
['医疗器械', '医疗器械'],
|
|
158
|
+
['医疗服务', '医疗服务'],
|
|
159
|
+
['医药商业', '医药商业'],
|
|
231
160
|
|
|
232
|
-
#
|
|
233
|
-
['
|
|
234
|
-
['
|
|
161
|
+
# 商贸零售 6
|
|
162
|
+
['一般零售', '一般零售'],
|
|
163
|
+
['互联网电商', '互联网电商'],
|
|
164
|
+
['贸易Ⅱ', '贸易'], #
|
|
165
|
+
['专业连锁Ⅱ', '零售专业连锁'], # 专业连锁 综合Ⅱ
|
|
166
|
+
# ['旅游零售Ⅱ', '旅游零售'], # merge旅游及景区
|
|
235
167
|
|
|
236
|
-
|
|
168
|
+
# 国防 7
|
|
169
|
+
['军工电子Ⅱ', '军工电子'],
|
|
170
|
+
['地面兵装Ⅱ', '地面兵装'],
|
|
171
|
+
['航天装备Ⅱ', '航天装备'],
|
|
172
|
+
['航空装备Ⅱ', '航空装备'],
|
|
173
|
+
['航海装备Ⅱ', '航海装备'],
|
|
237
174
|
|
|
175
|
+
# 基础化工 8
|
|
176
|
+
['化学制品', '化学制品'],
|
|
177
|
+
['化学原料', '化学原料'],
|
|
178
|
+
['化学纤维', '化学纤维'],
|
|
179
|
+
['农化制品', '化肥农药'],
|
|
180
|
+
['塑料', '塑料'],
|
|
181
|
+
['橡胶', '橡胶'],
|
|
182
|
+
['非金属材料Ⅱ', '非金属材料'],
|
|
183
|
+
|
|
184
|
+
# 家用电器 9
|
|
185
|
+
['白色家电', '白色家电'], # merge 家用电器
|
|
186
|
+
['照明设备Ⅱ', '照明设备'], # merge 家用电器
|
|
187
|
+
# ['其他家电Ⅱ', '其他家电'], # merge 小家电
|
|
188
|
+
['家电零部件Ⅱ', '家电零部件'], # merge 家用电器
|
|
189
|
+
['小家电', '小家电'], # merge '家用电器'
|
|
190
|
+
['黑色家电', '黑色家电'], # merge 家用电器
|
|
191
|
+
['厨卫电器', '厨卫电器'], # merge 家用电器
|
|
192
|
+
|
|
193
|
+
# 建筑材料 10
|
|
194
|
+
['装修建材', '装修建材'], #
|
|
195
|
+
['建筑建材', '装修建材'], #
|
|
196
|
+
['玻璃玻纤', '玻璃玻纤'],
|
|
197
|
+
['水泥', '水泥'],
|
|
198
|
+
|
|
199
|
+
# 建筑装饰 11
|
|
200
|
+
['基础建设', '基础建设'],
|
|
201
|
+
['房屋建设Ⅱ', '房屋建设'],
|
|
202
|
+
['工程咨询服务Ⅱ', '工程咨询服务'],
|
|
203
|
+
['专业工程', '建筑专业工程'],
|
|
204
|
+
['装修装饰Ⅱ', '装修装饰'],
|
|
205
|
+
|
|
206
|
+
# 房地产 12
|
|
207
|
+
['房地产开发', '房地产'],
|
|
208
|
+
['房地产服务', '房地产'],
|
|
209
|
+
|
|
210
|
+
# 有色金属 13
|
|
211
|
+
['能源金属', '能源金属'],
|
|
212
|
+
['小金属', '小金属'],
|
|
213
|
+
['贵金属', '贵金属'], #
|
|
214
|
+
['金属新材料', '金属新材料'],
|
|
215
|
+
['工业金属', '工业金属'], # 铅锌 铝 铜
|
|
216
|
+
|
|
217
|
+
# 机械设备 14
|
|
238
218
|
['自动化设备', '自动化设备'],
|
|
239
219
|
['轨交设备Ⅱ', '轨交设备'],
|
|
220
|
+
['通用设备', '通用设备'],
|
|
221
|
+
['专用设备', '专用设备'],
|
|
222
|
+
['工程机械', '工程机械'],
|
|
223
|
+
|
|
224
|
+
# 汽车 15
|
|
225
|
+
['汽车零部件', '汽车零部件'],
|
|
226
|
+
['汽车服务', '汽车服务'],
|
|
227
|
+
['乘用车', '乘用车'], # = merge 汽车整车
|
|
228
|
+
['商用车', '商用车'],
|
|
229
|
+
['摩托车及其他', '摩托车及其他'],
|
|
230
|
+
|
|
231
|
+
# 煤炭 16
|
|
232
|
+
['焦炭Ⅱ', '焦炭'], # merge to 煤炭
|
|
233
|
+
['煤炭开采', '煤炭开采'], # merge 煤炭
|
|
234
|
+
|
|
235
|
+
# 环保 17
|
|
236
|
+
['环境治理', '环境治理'], # merge, 环保
|
|
237
|
+
['环保设备Ⅱ', '环保设备'], # merge '环保'
|
|
238
|
+
|
|
239
|
+
# 电力设备 18
|
|
240
|
+
['电网设备', '电网设备'],
|
|
241
|
+
['电池', '电池'],
|
|
242
|
+
['电机Ⅱ', '电机'], #
|
|
243
|
+
['光伏设备', '光伏设备'],
|
|
244
|
+
['风电设备', '风电设备'],
|
|
245
|
+
['其他电源设备Ⅱ', '其他电源设备'],
|
|
246
|
+
|
|
247
|
+
# 电子 19
|
|
248
|
+
['半导体', '半导体'],
|
|
249
|
+
['电子化学品Ⅱ', '电子化学品'],
|
|
250
|
+
['光学光电子', '光学光电子'],
|
|
251
|
+
['消费电子', '消费电子'],
|
|
252
|
+
['元件', '元件'],
|
|
253
|
+
['其他电子Ⅱ', '其他电子'], #
|
|
254
|
+
|
|
255
|
+
# 石油石化 20
|
|
256
|
+
['炼化及贸易', '石油行业'], # merge 石油行业
|
|
257
|
+
['油服工程', '采掘行业'], # merge '采掘行业'
|
|
258
|
+
['油气开采Ⅱ', '石油行业'], # merge to 石油行业
|
|
240
259
|
|
|
241
|
-
#
|
|
242
|
-
|
|
243
|
-
['
|
|
244
|
-
['
|
|
245
|
-
['
|
|
246
|
-
['
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
['
|
|
250
|
-
['
|
|
251
|
-
['
|
|
260
|
+
# 社会服务 21
|
|
261
|
+
['专业服务', '社会专业服务'],
|
|
262
|
+
['旅游及景区', '旅游及景区'],
|
|
263
|
+
['酒店餐饮', '旅游酒店'],
|
|
264
|
+
['教育', '教育'],
|
|
265
|
+
# ['体育Ⅱ', '体育'],
|
|
266
|
+
|
|
267
|
+
# 纺织服装 22
|
|
268
|
+
['服装家纺', '纺织服装'], # merge 纺织服装
|
|
269
|
+
['纺织制造', '纺织服装'], # merge 纺织服装
|
|
270
|
+
['饰品', '饰品'],
|
|
271
|
+
|
|
272
|
+
# 综合 23
|
|
273
|
+
['综合Ⅱ', '综合'],
|
|
274
|
+
|
|
275
|
+
# 美容护理 24
|
|
276
|
+
['化妆品', '化妆美容'], # merge to 化妆美容
|
|
277
|
+
# ['医疗美容', '化妆美容'], # merge 化妆美容
|
|
278
|
+
['个护用品', '个护用品'],
|
|
279
|
+
|
|
280
|
+
# 计算机 25
|
|
281
|
+
['计算机设备', '计算机设备'],
|
|
282
|
+
['IT服务Ⅱ', 'IT服务'],
|
|
283
|
+
['软件开发', '软件开发'],
|
|
284
|
+
|
|
285
|
+
# 轻工制造 26
|
|
286
|
+
['造纸', '造纸'],
|
|
287
|
+
['包装印刷', '包装印刷'], #
|
|
288
|
+
['文娱用品', '文娱用品'], #
|
|
289
|
+
['家居用品', '家居用品'],
|
|
290
|
+
|
|
291
|
+
# 通信 27
|
|
292
|
+
['通信服务', '通信服务'],
|
|
293
|
+
['通信设备', '通信设备'],
|
|
294
|
+
|
|
295
|
+
# 钢铁 28
|
|
296
|
+
['普钢', '普钢'], #
|
|
297
|
+
['特钢Ⅱ', '特钢'],
|
|
298
|
+
['冶钢原料', '冶钢原料'],
|
|
299
|
+
|
|
300
|
+
# 银行 29
|
|
301
|
+
['国有大型银行Ⅱ', '银行'], # merge to 银行
|
|
302
|
+
['城商行Ⅱ', '银行'], #
|
|
303
|
+
['农商行Ⅱ', '银行'], # merge 银行
|
|
304
|
+
['股份制银行Ⅱ', '银行'], # merge to 银行
|
|
305
|
+
|
|
306
|
+
# 非银金融 30
|
|
307
|
+
['证券Ⅱ', '证券'],
|
|
308
|
+
['保险Ⅱ', '保险'],
|
|
309
|
+
['多元金融', '多元金融'],
|
|
310
|
+
|
|
311
|
+
# 食品饮料 31
|
|
312
|
+
['饮料乳品', '饮料乳品'], # merge 食品饮料
|
|
313
|
+
['食品加工', '食品加工'], # merge 食品饮料
|
|
314
|
+
['调味发酵品Ⅱ', '调味发酵品'], # merge to 食品饮料
|
|
315
|
+
['休闲食品', '休闲食品'], # merge '食品饮料'
|
|
316
|
+
['白酒Ⅱ', '白酒'],
|
|
317
|
+
['非白酒', '非白酒']
|
|
252
318
|
|
|
253
319
|
], columns=['second_sw_industry', 'industry'])
|
|
254
320
|
|
|
255
321
|
|
|
256
|
-
#
|
|
322
|
+
# 第三行业作为行业
|
|
257
323
|
def fix_industry_use_sw_third(company_info_df):
|
|
258
324
|
# 细分工业金属行业
|
|
259
325
|
company_info = company_info_df.copy()
|
|
260
326
|
company_info.loc[company_info.third_industry_code == '240303', 'industry'] = '铅锌'
|
|
261
327
|
company_info.loc[company_info.third_industry_code == '240301', 'industry'] = '铝'
|
|
262
328
|
company_info.loc[company_info.third_industry_code == '240302', 'industry'] = '铜'
|
|
329
|
+
|
|
330
|
+
company_info.loc[company_info.third_industry_code == '240303', 'second_sw_industry'] = '铅锌'
|
|
331
|
+
company_info.loc[company_info.third_industry_code == '240301', 'second_sw_industry'] = '铝'
|
|
332
|
+
company_info.loc[company_info.third_industry_code == '240302', 'second_sw_industry'] = '铜'
|
|
333
|
+
|
|
334
|
+
company_info.loc[company_info.third_industry_code == '240303', 'second_industry_code'] = '240303'
|
|
335
|
+
company_info.loc[company_info.third_industry_code == '240301', 'second_industry_code'] = '240301'
|
|
336
|
+
company_info.loc[company_info.third_industry_code == '240302', 'second_industry_code'] = '240302'
|
|
337
|
+
|
|
263
338
|
# 细分专业设备
|
|
264
339
|
company_info.loc[company_info.third_industry_code == '640203', 'industry'] = '能源及重型设备'
|
|
265
340
|
company_info.loc[company_info.third_industry_code == '640204', 'industry'] = '楼宇设备'
|
|
266
341
|
company_info.loc[company_info.third_industry_code == '640206', 'industry'] = '纺织服装设备'
|
|
267
342
|
company_info.loc[company_info.third_industry_code == '640207', 'industry'] = '农用机械'
|
|
268
343
|
company_info.loc[company_info.third_industry_code == '640208', 'industry'] = '印刷包装机械'
|
|
344
|
+
|
|
345
|
+
company_info.loc[company_info.third_industry_code == '640203', 'second_sw_industry'] = '能源及重型设备'
|
|
346
|
+
company_info.loc[company_info.third_industry_code == '640204', 'second_sw_industry'] = '楼宇设备'
|
|
347
|
+
company_info.loc[company_info.third_industry_code == '640206', 'second_sw_industry'] = '纺织服装设备'
|
|
348
|
+
company_info.loc[company_info.third_industry_code == '640207', 'second_sw_industry'] = '农用机械'
|
|
349
|
+
company_info.loc[company_info.third_industry_code == '640208', 'second_sw_industry'] = '印刷包装机械'
|
|
350
|
+
|
|
351
|
+
company_info.loc[company_info.third_industry_code == '640203', 'second_industry_code'] = '640203'
|
|
352
|
+
company_info.loc[company_info.third_industry_code == '640204', 'second_industry_code'] = '640204'
|
|
353
|
+
company_info.loc[company_info.third_industry_code == '640206', 'second_industry_code'] = '640206'
|
|
354
|
+
company_info.loc[company_info.third_industry_code == '640207', 'second_industry_code'] = '640207'
|
|
355
|
+
company_info.loc[company_info.third_industry_code == '640208', 'second_industry_code'] = '640208'
|
|
356
|
+
|
|
269
357
|
# todo 细分
|
|
270
358
|
company_info.loc[company_info.third_industry_code == '640209', 'industry'] = '专用设备'
|
|
271
|
-
company_info.loc[company_info.third_industry_code == '
|
|
272
|
-
company_info.loc[company_info.third_industry_code == '
|
|
359
|
+
company_info.loc[company_info.third_industry_code == '640209', 'second_sw_industry'] = '专用设备'
|
|
360
|
+
company_info.loc[company_info.third_industry_code == '640209', 'second_industry_code'] = '640208'
|
|
361
|
+
|
|
362
|
+
company_info.loc[company_info.third_industry_code == '260205', 'industry'] = '专用设备'
|
|
363
|
+
company_info.loc[company_info.third_industry_code == '260205', 'second_sw_industry'] = '专用设备'
|
|
364
|
+
company_info.loc[company_info.third_industry_code == '260205', 'second_industry_code'] = '260205'
|
|
365
|
+
|
|
273
366
|
# 细分通用设备
|
|
274
367
|
company_info.loc[company_info.third_industry_code == '640101', 'industry'] = '机床工具'
|
|
275
368
|
company_info.loc[company_info.third_industry_code == '640103', 'industry'] = '磨具磨料'
|
|
276
369
|
company_info.loc[company_info.third_industry_code == '640105', 'industry'] = '制冷空调设备'
|
|
277
370
|
company_info.loc[company_info.third_industry_code == '640106', 'industry'] = '通用设备'
|
|
278
371
|
company_info.loc[company_info.third_industry_code == '640107', 'industry'] = '仪器仪表'
|
|
279
|
-
company_info.loc[company_info.third_industry_code == '640301', 'industry'] = '仪器仪表'
|
|
280
|
-
# todo 细分
|
|
281
372
|
company_info.loc[company_info.third_industry_code == '640108', 'industry'] = '金属制品'
|
|
373
|
+
|
|
374
|
+
company_info.loc[company_info.third_industry_code == '640101', 'second_sw_industry'] = '机床工具'
|
|
375
|
+
company_info.loc[company_info.third_industry_code == '640103', 'second_sw_industry'] = '磨具磨料'
|
|
376
|
+
company_info.loc[company_info.third_industry_code == '640105', 'second_sw_industry'] = '制冷空调设备'
|
|
377
|
+
company_info.loc[company_info.third_industry_code == '640106', 'second_sw_industry'] = '通用设备'
|
|
378
|
+
company_info.loc[company_info.third_industry_code == '640107', 'second_sw_industry'] = '仪器仪表'
|
|
379
|
+
company_info.loc[company_info.third_industry_code == '640108', 'second_sw_industry'] = '金属制品'
|
|
380
|
+
|
|
381
|
+
company_info.loc[company_info.third_industry_code == '640101', 'second_industry_code'] = '640101'
|
|
382
|
+
company_info.loc[company_info.third_industry_code == '640103', 'second_industry_code'] = '640103'
|
|
383
|
+
company_info.loc[company_info.third_industry_code == '640105', 'second_industry_code'] = '640105'
|
|
384
|
+
company_info.loc[company_info.third_industry_code == '640106', 'second_industry_code'] = '640106'
|
|
385
|
+
company_info.loc[company_info.third_industry_code == '640107', 'second_industry_code'] = '640107'
|
|
386
|
+
company_info.loc[company_info.third_industry_code == '640108', 'second_industry_code'] = '640108'
|
|
387
|
+
|
|
282
388
|
return company_info
|
|
283
389
|
|
|
284
390
|
|
|
285
|
-
def find_sw_third_industry(
|
|
286
|
-
sw_third_industry = mongodb_util.find_query_data('sw_industry', query={"_id":
|
|
391
|
+
def find_sw_third_industry(new_third_industry_code):
|
|
392
|
+
sw_third_industry = mongodb_util.find_query_data('sw_industry', query={"_id": new_third_industry_code})
|
|
287
393
|
first_sw_industry_name = list(sw_third_industry['first_sw_industry'])[0]
|
|
288
394
|
second_sw_industry_name = list(sw_third_industry['second_sw_industry'])[0]
|
|
289
395
|
|
|
@@ -302,35 +408,29 @@ def find_sw_third_industry(industry_id):
|
|
|
302
408
|
return sw_third_industry
|
|
303
409
|
|
|
304
410
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
company_info['
|
|
309
|
-
company_info['
|
|
310
|
-
company_info['
|
|
311
|
-
company_info['
|
|
312
|
-
company_info['
|
|
411
|
+
# 修改行业信息
|
|
412
|
+
def fix_industry_data(new_third_industry_code, company_info):
|
|
413
|
+
sw_industry = find_sw_third_industry(new_third_industry_code)
|
|
414
|
+
company_info['first_sw_industry'] = list(sw_industry['first_sw_industry'])[0]
|
|
415
|
+
company_info['first_industry_code'] = list(sw_industry['industry_code'])[0]
|
|
416
|
+
company_info['second_sw_industry'] = list(sw_industry['second_sw_industry'])[0]
|
|
417
|
+
company_info['second_industry_code'] = list(sw_industry['second_industry_code'])[0]
|
|
418
|
+
company_info['third_sw_industry'] = list(sw_industry['third_sw_industry'])[0]
|
|
419
|
+
company_info['third_industry_code'] = list(sw_industry['industry_code'])[0]
|
|
313
420
|
return company_info
|
|
314
421
|
|
|
315
422
|
|
|
423
|
+
# 手动修改股票行业代码
|
|
316
424
|
def fix_symbol_industry(company_info, symbol):
|
|
317
425
|
fix_symbol_df = get_fix_symbol_industry()
|
|
318
426
|
fix_symbol_df_one = fix_symbol_df.loc[fix_symbol_df['symbol'] == symbol]
|
|
319
427
|
if data_frame_util.is_not_empty(fix_symbol_df_one):
|
|
320
|
-
|
|
321
|
-
company_info = fix_industry_data(
|
|
428
|
+
new_third_industry_code = list(fix_symbol_df_one['new_industry_code'])[0]
|
|
429
|
+
company_info = fix_industry_data(new_third_industry_code, company_info)
|
|
322
430
|
|
|
323
431
|
return company_info
|
|
324
432
|
|
|
325
433
|
|
|
326
|
-
def fix_one_symbol():
|
|
327
|
-
symbol = '300483'
|
|
328
|
-
company_info = mongodb_util.find_query_data('company_info', query={'_id': symbol})
|
|
329
|
-
company_info = fix_symbol_industry(company_info, symbol)
|
|
330
|
-
company_info['industry'] = company_info['second_sw_industry']
|
|
331
|
-
mongodb_util.save_mongo(company_info, 'company_info')
|
|
332
|
-
|
|
333
|
-
|
|
334
434
|
def filed_sort(company_info):
|
|
335
435
|
return company_info[[
|
|
336
436
|
"_id",
|
|
@@ -353,6 +453,9 @@ def filed_sort(company_info):
|
|
|
353
453
|
"final_controller_name",
|
|
354
454
|
"final_controller_rate",
|
|
355
455
|
"mv_circulation_ratio",
|
|
456
|
+
'qfii_type',
|
|
457
|
+
'qfii_number',
|
|
458
|
+
'share_holder_sync_day',
|
|
356
459
|
"flow_mv_sp",
|
|
357
460
|
"total_mv_sp",
|
|
358
461
|
"now_price",
|
|
@@ -371,6 +474,7 @@ def filed_sort(company_info):
|
|
|
371
474
|
"ROE",
|
|
372
475
|
"classification",
|
|
373
476
|
"base_business",
|
|
477
|
+
"intro",
|
|
374
478
|
"address",
|
|
375
479
|
"market_id",
|
|
376
480
|
"symbol",
|
|
@@ -379,18 +483,25 @@ def filed_sort(company_info):
|
|
|
379
483
|
"ths_concept_list_info",
|
|
380
484
|
'ths_concept_name_list_str',
|
|
381
485
|
'ths_concept_count',
|
|
486
|
+
'ths_concept_most_relative_name',
|
|
487
|
+
'ths_concept_most_relative_code',
|
|
488
|
+
'ths_concept_list',
|
|
382
489
|
"kpl_plate_name",
|
|
383
490
|
"kpl_most_relative_name",
|
|
384
491
|
"kpl_plate_list_info",
|
|
385
492
|
'operate_profit',
|
|
386
493
|
'total_operate_income',
|
|
494
|
+
'operate_date_name',
|
|
387
495
|
'kzz_debt_list',
|
|
388
496
|
'hk_stock_code',
|
|
389
|
-
'hk_stock_name'
|
|
497
|
+
'hk_stock_name',
|
|
498
|
+
'main_business_list',
|
|
499
|
+
'most_profitable_business',
|
|
500
|
+
'most_profitable_business_rate',
|
|
501
|
+
'most_profitable_business_profit',
|
|
390
502
|
]]
|
|
391
503
|
|
|
392
504
|
|
|
393
505
|
if __name__ == '__main__':
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
print(industry_df)
|
|
506
|
+
industry_df_test = get_fix_industry_name_df()
|
|
507
|
+
print(industry_df_test)
|