test

youngwarrior 发布于 2024-06-01 843 次阅读


<pre class="EnlighterJSRAW wp-block-code" data-enlighter-language="python" data-enlighter-theme="atomic" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="test_code.py" data-enlighter-group="1">#导入慧博数据分众传媒
data1 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data2 = pd.read_excel('C:\Users\86181\Desktop\文件\分从传媒\分众传媒公司综合能力202111616100.xls')
data3 = pd.read_excel('C:\Users\86181\Desktop\文件\分从传媒\分众传媒资产负债表202111616940.xls')
#获取盈利因子
yingli1 = data2.iloc[14:22,:]
print(yingli1)
print('/n')
#获取规模因子
guimo_1 = data3.iloc[66,:]
guimo_2 = data3.iloc[76:78,:]
guimo1 = guimo_2.append(guimo_1)
print(guimo1)
print('/n')
#获取估值因子
guzhi1 = data3.iloc[83:89,:]
print(guzhi1)
print('/n')
import baostock as bs
#导入慧博数据
data4 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data5 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data6 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli2 = data5.iloc[14:22,:]
print(yingli2)
print('/n')
#获取规模因子
guimo_3 = data6.iloc[66,:]
guimo_4 = data6.iloc[76:78,:]
guimo2 = guimo_4.append(guimo_3)
print(guimo2)
print('/n')
#获取估值因子
guzhi2 = data6.iloc[83:89,:]
print(guzhi2)
print('/n')
import baostock as bs
#导入慧博数据
data7 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data8 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data9 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli3 = data8.iloc[14:22,:]
print(yingli3)
print('/n')
#获取规模因子
guimo_5 = data9.iloc[66,:]
guimo_6 = data9.iloc[76:78,:]
guimo3 = guimo_6.append(guimo_5)
print(guimo3)
print('/n')
#获取估值因子
guzhi3 = data9.iloc[83:89,:]
print(guzhi3)
print('/n')
import baostock as bs
#导入慧博数据
data10 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data11 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data12 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli4 = data11.iloc[14:22,:]
print(yingli4)
print('/n')
#获取规模因子
guimo_7 = data12.iloc[66,:]
guimo_8 = data12.iloc[76:78,:]
guimo4 = guimo_8.append(guimo_7)
print(guimo4)
print('/n')
#获取估值因子
guzhi4 = data12.iloc[83:89,:]
print(guzhi4)
print('/n')
import baostock as bs
#导入慧博数据
data13 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data14 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data15 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli5 = data14.iloc[14:22,:]
print(yingli5)
print('/n')
#获取规模因子
guimo_9 = data15.iloc[66,:]
guimo_10 = data15.iloc[76:78,:]
guimo5 = guimo_10.append(guimo_9)
print(guimo5)
print('/n')
#获取估值因子
guzhi5 = data15.iloc[83:89,:]
print(guzhi5)
print('/n')
import baostock as bs
#导入慧博数据
data16 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data17 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data18 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli6 = data17.iloc[14:22,:]
print(yingli6)
print('/n')
#获取规模因子
guimo_11 = data18.iloc[66,:]
guimo_12 = data18.iloc[76:78,:]
guimo6 = guimo_12.append(guimo_11)
print(guimo6)
print('/n')
#获取估值因子
guzhi6 = data18.iloc[83:89,:]
print(guzhi6)
print('/n')
import baostock as bs
#导入慧博数据
data19 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data20 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data21 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli7 = data20.iloc[14:22,:]
print(yingli7)
print('/n')
#获取规模因子
guimo_13 = data21.iloc[66,:]
guimo_14 = data21.iloc[76:78,:]
guimo7 = guimo_14.append(guimo_13)
print(guimo7)
print('/n')
#获取估值因子
guzhi7 = data21.iloc[83:89,:]
print(guzhi7)
print('/n')
import baostock as bs
#导入慧博数据
data22 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data23 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data24 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli8 = data23.iloc[14:22,:]
print(yingli8)
print('/n')
#获取规模因子
guimo_15 = data24.iloc[66,:]
guimo_16 = data24.iloc[76:78,:]
guimo8 = guimo_16.append(guimo_15)
print(guimo8)
print('/n')
#获取估值因子
guzhi8 = data24.iloc[83:89,:]
print(guzhi8)
print('/n')
import baostock as bs
#导入慧博数据
data25 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data26 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data27 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli9 = data26.iloc[14:22,:]
print(yingli9)
print('/n')
#获取规模因子
guimo_17 = data27.iloc[66,:]
guimo_18 = data27.iloc[76:78,:]
guimo9 = guimo_18.append(guimo_17)
print(guimo9)
print('/n')
#获取估值因子
guzhi9 = data27.iloc[83:89,:]
print(guzhi9)
print('/n')
import baostock as bs
#导入慧博数据
data28 = pd.read_excel('D:\pythonProject1\Fenzhongchuanmei (1).xls')
data29 = pd.read_excel('D:\pythonProject1\分众传媒公司综合能力2021116155154.xls')
data30 = pd.read_excel('D:\pythonProject1\分众传媒资产负债表2021116154149.xls')
#获取盈利因子
yingli10 = data29.iloc[14:22,:]
print(yingli10)
print('/n')
#获取规模因子
guimo_19 = data30.iloc[66,:]
guimo_20 = data30.iloc[76:78,:]
guimo10 = guimo_20.append(guimo_19)
print(guimo10)
print('/n')
#获取估值因子
guzhi10 = data30.iloc[83:89,:]
print(guzhi10)
print('/n')
import baostock as bs&lt;/pre></pre>