通过聚源读取上市公司的业绩快报列表数据,根据自己的需要调整筛选股票
要
from jqdata import jyimport pandas as pdfrom sqlalchemy import or_pd.options.display.max_rows = 500pd.options.display.max_columns = 200pd.options.display.width = 1000pd.options.display.max_colwidth = 500q = query(jy.LC_PerformanceLetters.CompanyCode,jy.LC_PerformanceLetters.NetProfitCut,#扣除非经常性损益后净利润(元)jy.LC_PerformanceLetters.TotalAssets,#总资产(元)jy.LC_PerformanceLetters.BasicEPS,#每股收益jy.LC_PerformanceLetters.ROE,#净资产收益率(摊薄)(%)jy.LC_PerformanceLetters.OperatingProfitYOY.label('营业利润同比'),# 营业利润同比(%) 数字 6.900000 Nonejy.LC_PerformanceLetters.TotalProfitYOY,# 利润总额同比(%)jy.LC_PerformanceLetters.NetProfitCutYOY.label('扣非净利同比'),# 扣除非经常性损益后净利润同比(%) 数字 6.600000 Nonejy.LC_PerformanceLetters.NetAssetPSToOpening.label('每股净资同比增长'),# 每股净资产较期初比(%)).filter(jy.LC_PerformanceLetters.EndDate >= '2018-12-31',jy.LC_PerformanceLetters.ROE >= 6).limit(5000)df = jy.run_query(q)df.drop_duplicates(subset=['CompanyCode'], keep='last', inplace=True)df.index = df['CompanyCode']df2 = jy.run_query(query(jy.SecuMain.CompanyCode,jy.SecuMain.SecuAbbr,).filter(#or_(jy.SecuMain.SecuCategory== 1,jy.SecuMain.SecuCategory == 2)jy.SecuMain.SecuCategory== 1,jy.SecuMain.CompanyCode.in_(df['CompanyCode'])).limit(5000))df2.drop_duplicates(subset=['CompanyCode'], keep='last', inplace=True)df2.index = df2['CompanyCode']df.drop([ 'CompanyCode'],axis=1,inplace=True)df2.drop([ 'CompanyCode'],axis=1,inplace=True)df_all = pd.concat([df2, df],axis =1)df_all = df_all[df_all['ROE'].notnull() ]df_all = df_all[(df_all['ROE']>= 7) & (df_all['营业利润同比'] >=20) & (df_all['每股净资同比增长'] > 5) ]print(len(df_all))#df_all = df_all.sort_values(by='扣非净利同比', ascending=False) df_all = df_all.sort_values(by='营业利润同比', ascending=False) df_all
40
.dataframe thead tr:only-child th { text-align: right; } .dataframe thead th { text-align: left; } .dataframe tbody tr th { vertical-align: top; }
SecuAbbr | NetProfitCut | TotalAssets | BasicEPS | ROE | 营业利润同比 | TotalProfitYOY | 扣非净利同比 | 每股净资同比增长 | |
---|---|---|---|---|---|---|---|---|---|
CompanyCode | |||||||||
368 | 中百集团 | NaN | 8.125474e+09 | 0.6300 | 12.662366 | 163.03 | 327.65 | NaN | 12.940000 |
77061 | 久立特材 | NaN | 5.201310e+09 | 0.3600 | 9.615635 | 155.86 | 156.32 | NaN | 9.590000 |
170671 | 艾 比 森 | NaN | 2.116509e+09 | 0.7734 | 19.252173 | 151.28 | 139.01 | NaN | 22.390000 |
50405 | 云海金属 | NaN | 4.520293e+09 | 0.5148 | 18.184666 | 148.08 | 113.79 | NaN | 17.920000 |
79035 | 欧菲科技 | NaN | 4.012391e+10 | 0.6900 | 16.740228 | 97.98 | 109.19 | NaN | 20.900000 |
176056 | 千禾味业 | NaN | 1.930225e+09 | 0.7362 | 18.370621 | 68.03 | 66.43 | NaN | 22.820000 |
170005 | 克明面业 | NaN | 3.964450e+09 | 0.5720 | 8.381159 | 63.27 | 55.39 | NaN | 5.280000 |
1408 | 涪陵电力 | NaN | 4.732110e+09 | 1.5600 | 23.826889 | 59.11 | 59.39 | NaN | 29.450000 |
81910 | 汉得信息 | 2.703877e+08 | 3.846546e+09 | 0.4500 | 12.671907 | 50.66 | 40.05 | 8.30 | 21.880000 |
78841 | 凯撒文化 | NaN | 4.806750e+09 | 0.3600 | 7.512780 | 48.75 | 48.96 | NaN | 5.910000 |
74788 | 利尔化学 | NaN | 6.582370e+09 | 1.1130 | 18.450791 | 47.57 | 46.86 | NaN | 32.820000 |
76758 | 中国国旅 | 3.198991e+09 | 2.709596e+10 | 1.6123 | 19.315681 | 42.33 | 40.59 | 30.04 | 16.130000 |
50001 | 荣盛发展 | NaN | 2.275812e+11 | 1.7600 | 22.546432 | 42.17 | 36.12 | NaN | 23.380000 |
73279 | 海亮股份 | NaN | 1.925825e+10 | 0.5178 | 11.245587 | 40.27 | 40.99 | NaN | 34.750000 |
1401 | 片 仔 癀 | 1.108852e+09 | 6.584917e+09 | 1.8700 | 22.891566 | 40.13 | 41.15 | 43.03 | 19.100000 |
170717 | 健帆生物 | NaN | 2.049427e+09 | 0.9700 | 23.653249 | 38.97 | 39.12 | NaN | 21.560000 |
3711 | 保利地产 | 1.809813e+10 | 8.522384e+11 | 1.5800 | 15.193743 | 38.41 | 38.29 | 17.22 | 15.300000 |
78612 | 长青股份 | 3.228477e+08 | 4.072534e+09 | 0.8906 | 9.822558 | 38.37 | 38.88 | 40.43 | 6.960000 |
177092 | 多伦科技 | 1.232263e+08 | 2.102354e+09 | 0.2122 | 8.956461 | 38.25 | 38.02 | 28.74 | 6.360000 |
1390 | 现代制药 | 3.501771e+08 | 1.649490e+10 | 0.6400 | 10.488855 | 37.57 | 36.05 | -17.79 | 15.340000 |
158482 | 维格娜丝 | 2.160000e+08 | 6.745000e+09 | 1.5900 | 11.336367 | 37.26 | 36.58 | 15.24 | 24.330000 |
159226 | 永高股份 | NaN | 5.429564e+09 | 0.2200 | 8.440823 | 33.96 | 23.74 | NaN | 7.920000 |
158551 | 博雅生物 | NaN | 5.100053e+09 | 1.1100 | 12.654755 | 33.54 | 35.06 | NaN | 52.470000 |
1348 | 红星发展 | NaN | 1.897674e+09 | 0.4000 | 9.137021 | 31.69 | 27.59 | NaN | 9.770000 |
220212 | 智能自控 | 5.086258e+07 | 9.946554e+08 | 0.3000 | 9.846035 | 30.72 | 30.29 | 9.14 | 9.230000 |
1805 | 中炬高新 | 5.733508e+08 | 5.940291e+09 | 0.7610 | 16.830550 | 30.62 | 30.22 | 38.22 | 14.750000 |
230352 | 大博医疗 | NaN | 1.676576e+09 | 0.9600 | 26.533731 | 30.51 | 30.56 | NaN | 17.920000 |
177444 | 欧普照明 | 6.001550e+08 | 7.363906e+09 | 1.2000 | 20.796557 | 30.48 | 30.29 | 3.19 | 19.090000 |
398 | 酒 鬼 酒 | NaN | 2.864568e+09 | 0.6934 | 10.323943 | 30.13 | 32.09 | NaN | 8.800000 |
177511 | 国检集团 | 1.522480e+08 | 1.568742e+09 | 0.8655 | 16.292490 | 28.85 | 31.18 | 24.57 | 13.461538 |
191485 | 绝味食品 | NaN | 3.836587e+09 | 1.5600 | 21.220770 | 27.04 | 26.92 | NaN | 17.540000 |
175260 | 桃李面包 | 6.180225e+08 | 3.906920e+09 | 1.3700 | 18.778869 | 26.74 | 25.33 | 22.19 | 8.350000 |
423 | 东莞控股 | NaN | 1.100796e+10 | 1.0104 | 16.174120 | 23.24 | 23.12 | NaN | 14.890000 |
4097 | 中国海诚 | NaN | 4.258295e+09 | 0.5000 | 14.625437 | 23.21 | 1.02 | NaN | 8.230000 |
1539 | 绿地控股 | NaN | 1.003703e+12 | 0.9600 | 17.154070 | 22.87 | 25.60 | NaN | 8.750000 |
191295 | 万兴科技 | NaN | 7.041489e+08 | 1.0600 | 13.092670 | 22.48 | 29.94 | NaN | 71.430000 |
1196 | 伊 力 特 | 4.046211e+08 | 3.405555e+09 | 1.0011 | 17.663245 | 21.55 | 21.26 | 18.80 | 15.280000 |
365 | 新华制药 | NaN | 5.904579e+09 | 0.4000 | 9.339994 | 21.29 | 21.92 | NaN | 8.270000 |
1463 | 中天科技 | 1.944250e+09 | 3.212987e+10 | 0.7020 | 11.133018 | 21.17 | 21.53 | 38.93 | 8.290000 |
202200 | 寿 仙 谷 | NaN | 1.193327e+09 | 0.7600 | 10.903483 | 21.08 | 23.63 | NaN | 10.390000 |
本社区仅针对特定人员开放
查看需注册登录并通过风险意识测评
5秒后跳转登录页面...