股票代码 | 股票名称
600602 | 云赛智联
002373 | 千方科技
300020 | 银江股份
000662 | 天夏智慧
import numpy as np
import pandas as pd
from pandas import DataFrame
import matplotlib
import matplotlib.pyplot as plt
from pylab import *
from matplotlib.font_manager import *
#显示所有列
pd.set_option('display.max_columns', None)
#显示所有行
pd.set_option('display.max_rows', None)
#设置value的显示长度为100,默认为50
pd.set_option('max_colwidth',100)
# 不以科学计数法显示(2f,保留2位小数)
pd.set_option('display.float_format', lambda x: '%.2f' % x)
df=pd.read_csv('Price_Market_Value.txt', dtype={'Stock':str}).set_index('Stock')
df.plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.sort_index(ascending=False)
stock_pooling=['300168','600602','002373','300020','000662']
df_sales=pd.DataFrame()
for i in stock_pooling:
file_item=[i,'/',i,'_income_statement.txt']
file=''.join(file_item)
df=pd.read_csv(file,index_col='index_date')
df=df.iloc[:,1].astype(float).to_frame()
df.columns=[i]
df_sales=pd.concat([df_sales, df], axis=1, sort=False, join='outer')
df_sales=df_sales.T.sort_index(ascending=False).T.fillna(0)
df_sales.sort_index(ascending=True,inplace=True) #.plot(kind='line',grid=True, figsize=(10,4), rot=0)
figure, ax=plt.subplots(1, 1, figsize=(16, 8))
x=df_sales.index
y1,y2,y3,y4,y5=df_sales['600602'], df_sales['300168'], df_sales['300020'], df_sales['002373'], df_sales['000662']
ax.plot(x, y1, 'o-')
ax.plot(x, y2, 'o-')
ax.plot(x, y3, 'o-')
ax.plot(x, y4, 'o-')
ax.plot(x, y5, 'o-')
ax.set_title('Sales' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=9,fontsize=15)
plt.tight_layout()
plt.show()
df_sales.T.sort_index(ascending=False).T.sort_index(ascending=False)
stock_pooling=['300168','600602','002373','300020','000662']
df_g=pd.DataFrame()
df_sales=pd.DataFrame()
for i in stock_pooling:
file_item=[i,'/',i,'_income_statement.txt']
file=''.join(file_item)
df=pd.read_csv(file,index_col='index_date')
df=df.iloc[:,[1,8]]
df['GPM']=df.apply(lambda x: x[0]-x[1], axis=1)
df['GPR']=df.apply(lambda x: x[2]/x[0], axis=1)
df=df.iloc[:,3].to_frame().astype(float)
df.columns=[i]
df.index.set_names('index_date', inplace=True)
if df_g.empty == True:
df_g = df
df_g=pd.concat([df,df_g],axis=1, sort=True).fillna(0)
df_g=df_g.T.sort_index(ascending=False)
df_g.drop_duplicates(inplace=True)
df_g=df_g.T
figure, ax=plt.subplots(1, 1, figsize=(16, 8))
x=df_g.index
y1,y2,y3,y4,y5=df_g['600602'], df_g['300168'], df_g['300020'], df_g['002373'], df_g['000662']
ax.plot(x, y1, 'o-')
ax.plot(x, y2, 'o-')
ax.plot(x, y3, 'o-')
ax.plot(x, y4, 'o-')
ax.plot(x, y5, 'o-')
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=9,fontsize=15)
plt.tight_layout()
plt.show()
df_g
stock_pooling=['300168','600602','002373','300020','000662']
df_e=pd.DataFrame()
df_sales=pd.DataFrame()
for i in stock_pooling:
file_item=[i,'/',i,'_EBIT.txt']
file=''.join(file_item)
df=pd.read_csv(file,index_col='index_date')
df=df.iloc[:,5].to_frame().astype(float)
df.columns=[i]
df.index.set_names('index_date', inplace=True)
if df_e.empty == True:
df_e = df
df_e=pd.concat([df,df_e],axis=1, sort=True).fillna(0)
df_e=df_e.T.sort_index(ascending=False)
df_e.drop_duplicates(inplace=True)
df_e=df_e.T
figure, ax=plt.subplots(1, 1, figsize=(16, 8))
x=df_e.index
y1,y2,y3,y4,y5=df_e['600602'], df_e['300168'], df_e['300020'], df_e['002373'], df_e['000662']
ax.plot(x, y1, 'o-')
ax.plot(x, y2, 'o-')
ax.plot(x, y3, 'o-')
ax.plot(x, y4, 'o-')
ax.plot(x, y5, 'o-')
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=9,fontsize=15)
plt.tight_layout()
plt.show()
df_e
df=pd.read_csv('600602/600602_category_sales_pivot.txt', index_col='index_date')
df1=df.iloc[:,[3,4,5]]
df1.columns=['others','intelligence','software']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df1.index
y1,y2, y3 = df1['others'], df1['intelligence'], df1['software']
ax.stackplot(x, [y1, y2, y3], labels=['others', 'intelligence', 'software'])
ax.set_title('Sales' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df3=df.iloc[:,[3,4,5]]
df3=df3.pct_change()
df3.columns=['others_growth_rate','intelligence_growth_rate','software_growth_rate']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df3.index[0:]
y1,y2, y3 = df3['others_growth_rate'][0:], df3['intelligence_growth_rate'][0:], df3['software_growth_rate'][0:]
y4=[0]*len(df3['others_growth_rate'][0:])
ax.plot(x, y1, 'r-') #, labels=['software_gpr'])
ax.plot(x, y2, 'g-') #, labels=['services_gpr'])
ax.plot(x, y3, 'b-') #, labels=['integration_gpr'])
ax.plot(x, y4, 'k--')
ax.set_title('Growth Rate' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df2=df.loc[:, ['others_gpr','intelligence_gpr','software_gpr']]
df2.columns=['others_gpr','intelligence_gpr','software_gpr']
df2
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df2.index
y1,y2, y3 = df2['others_gpr'], df2['intelligence_gpr'], df2['software_gpr']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'k-')
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df.iloc[:,[3,4,5]].sort_index(ascending=False)
df=pd.read_csv('300168/300168_category_sales_pivot.txt', index_col='index_date')
df1=df.iloc[:,[3,4,5]]
df1.columns=['software','services','integration']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df1.index
y1,y2, y3 = df1['software'], df1['services'], df1['integration']
ax.stackplot(x, [y1, y2, y3], labels=['software', 'services', 'integration']) # 其中[]可以省略
# ax.set_xlabel("Year-Month-Date") # 设定x轴的标签
# ax.set_ylabel("Sales") # 设定y轴的标签
ax.set_title('Sales' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df3=df.iloc[:,[3,4,5]]
df3=df3.pct_change()
df3.columns=['software_growth_rate','services_growth_rate','integration_growth_rate']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df3.index[0:-1]
y1,y2, y3 = df3['software_growth_rate'][0:-1], df3['services_growth_rate'][0:-1], df3['integration_growth_rate'][0:-1]
y4=[0]*len(df3['software_growth_rate'][0:-1])
ax.plot(x, y1, 'r-') #, labels=['software_gpr'])
ax.plot(x, y2, 'g-') #, labels=['services_gpr'])
ax.plot(x, y3, 'b-') #, labels=['integration_gpr'])
ax.plot(x, y4, 'k--')
ax.set_title('Growth Rate' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df2=df.loc[:, ['software_gpr','services_gpr','integration_gpr']]
df2.columns=['software_gpr','services_gpr','integration_gpr']
df2
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df2.index
y1,y2, y3 = df2['software_gpr'], df2['services_gpr'], df2['integration_gpr']
#ax.plot(x, [y1, y2, y3], labels=['software_gpr', 'services_gpr', 'integration_gpr']) # 其中[]可以省略
ax.plot(x, y1, 'r-') #, labels=['software_gpr'])
ax.plot(x, y2, 'g-') #, labels=['services_gpr'])
ax.plot(x, y3, 'k-') #, labels=['integration_gpr'])
# ax.set_xlabel("Year-Month-Date") # 设定x轴的标签
# ax.set_ylabel("Sales") # 设定y轴的标签
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df.iloc[:,[3,4,5]].sort_index(ascending=False)
产品与服务:
2016年前5大客户
序号 | 客户名称 | 销售额(元) | 占年度销售总额比例 |
---|---|---|---|
1 | 中国电信股份有限公司自贡分公司 | 80,255,239.29 | 4.30% |
2 | 中国电信股份有限公司攀枝花分公司 | 70,534,916.50 | 3.77% |
3 | 上海市人力资源和社会保障局 | 63,647,893.40 | 3.41% |
4 | 上海市徐汇区人民政府机关事务管理局 | 45,971,619.60 | 2.46% |
5 | 上海市税务局 | 39,636,180.65 | 2.12% |
合计 | -- | 300,045,849.44 | 16.06% |
序号 | 客户名称 | 销售额(元) | 占年度销售总额比例 |
---|---|---|---|
1 | 雅安市公安局 | 216,152,753.16 | 8.95% |
2 | 上海市工商行政管理局(含区县市场监管局) | 95,069,201.67 | 3.94% |
3 | 湖南东旭德来电子科技有限公司 | 77,469,231.01 | 3.21% |
4 | 重庆市人力资源和社会保障局 | 50,368,295.27 | 2.09% |
5 | 英迈电子商贸(上海)有限公司 | 50,321,729.54 | 2.07% |
合计 | -- | 489,381,210.65 | 20.26% |
df=pd.read_csv('300020/300020_category_sales_pivot.txt', index_col='index_date')
df1=df.iloc[:,[4,5,6,7]]
df1.columns=['others','traffic','medication','smart_city']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df1.index
y1,y2,y3,y4 = df1['others'], df1['traffic'], df1['medication'], df1['smart_city']
ax.stackplot(x, [y1, y2, y3, y4], labels=['others', 'traffic', 'medication', 'smart_city']) # 其中[]可以省略
# ax.set_xlabel("Year-Month-Date") # 设定x轴的标签
# ax.set_ylabel("Sales") # 设定y轴的标签
ax.set_title('Sales' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df3=df.iloc[:,[4,5,6,7]]
df3=df3.pct_change()
df3.columns=['others_growth_rate','traffic_growth_rate','medication_growth_rate','smart_city_growth_rate']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df3.index
y1,y2, y3, y4= df3['others_growth_rate'], df3['traffic_growth_rate'], df3['medication_growth_rate'], df3['smart_city_growth_rate']
y5=[0]*len(df3['others_growth_rate'])
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'm-')
ax.plot(x, y4, 'b-')
ax.plot(x, y5, 'k--')
ax.set_title('Growth Rate' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df2=df.loc[:, ['others_gpr','traffic_gpr','medication_gpr','smart_city_gpr']]
df2.columns=['others_gpr','traffic_gpr','medication_gpr','smart_city_gpr']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df2.index
y1,y2, y3, y4 = df2['others_gpr'], df2['traffic_gpr'], df2['medication_gpr'], df2['smart_city_gpr']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'k-')
ax.plot(x, y4, 'b-')
# ax.set_xlabel("Year-Month-Date")
# ax.set_ylabel("Sales")
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df.iloc[:,[4,5,6,7]].sort_index(ascending=False)
1、城市级交通信号云控制关键技术研发与应用
2、银江城市公共信息服务平台
3、指挥通
4、交通宝
5、Enloop大数据共性技术平台
6、司法行政智能辅助解决方案
7、基于医疗信息智能挖掘与服务的云计算软件
8、智慧医疗大数据分析平台
9、物联网AP
10、智慧水务物联网应用及大数据服务平台
df=pd.read_csv('002373/002373_category_sales_pivot.txt', index_col='index_date')
df
df1=df.iloc[:,[4,5,6,7]]
df1.columns=['product_sales','others','software','integration']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df1.index
y1,y2,y3,y4 = df1['product_sales'], df1['others'], df1['software'], df1['integration']
ax.stackplot(x, [y1, y2, y3, y4], labels=['product_sales', 'others', 'software', 'integration'])
ax.set_title('Sales' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df3=df.iloc[:,[4,5,6,7]]
df3=df3.pct_change()
df3.columns=['product_sales_growth_rate','others_growth_rate','software_growth_rate','integration_growth_rate']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df3.index
y1,y2, y3, y4= df3['product_sales_growth_rate'], df3['others_growth_rate'], df3['software_growth_rate'], df3['integration_growth_rate']
y5=[0]*len(df3['product_sales_growth_rate'])
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'm-')
ax.plot(x, y4, 'b-')
ax.plot(x, y5, 'k--')
ax.set_title('Growth Rate' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df2=df.loc[:, ['product_sales_gpr','others_gpr','software_gpr','integration_gpr']]
df2.columns=['product_sales_gpr','others_gpr','software_gpr','integration_gpr']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df2.index
y1,y2, y3, y4 = df2['product_sales_gpr'], df2['others_gpr'], df2['software_gpr'], df2['integration_gpr']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'k-')
ax.plot(x, y4, 'b-')
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df.iloc[:,[4,5,6,7]].sort_index(ascending=False)
2014年在智能交通领域形成完整的产业链,形成“城市智能交通”、“高速公路智能交通”与“综合交通信息服务”三大智能交通业务板块。目前国内高速公路智能交通系统集成商多达几十家,其中,国外厂商基本上已经退出竞争,较有影响力的厂商均为国内厂商,包括紫光捷通、安徽皖通科技股份有限公司、亿阳信通股份有限公司和中海网络科技股份有限公司等,占据了相对较多的市场空间。
2014年公司前5大客户资料
序号 | 客户名称 | 销售额(元) | 占年度销售总额比例 |
---|---|---|---|
1 | 山东高速集团四川乐自公路有限公司 | 107,023,294.90 | 7.87% |
2 | 宁波穿山疏港高速公路有限公司 | 103,500,000.00 | 7.61% |
3 | 云南石锁高速公路建设指挥部 | 72,372,121.95 | 5.32% |
4 | 湖南省吉怀高速公路建设开发有限公司 | 62,704,502.00 | 4.61% |
5 | 云南锁蒙高速公路有限公司 | 61,423,278.93 | 4.51% |
合计 | -- | 407,023,197.78 | 29.91% |
序号 | 客户名称 | 销售额(元) | 占年度销售总额比例 |
---|---|---|---|
1 | 杭新景高速公路(衢州段)工程建设指挥部 | 123,628,351.46 | 4.94% |
2 | 甘肃省路桥建设集团有限公司 | 85,765,268.00 | 3.42% |
3 | 山东高速集团有限公司 | 78,158,716.19 | 3.12% |
4 | 青海地方铁路建设投资有限公司 | 60,879,613.76 | 2.43% |
5 | 甘肃省高速公路管理局 | 56,114,242.89 | 2.24% |
合计 | -- | 404,546,192.30 | 16.15 |
df=pd.read_csv('000662/000662_category_sales_pivot.txt', index_col='index_date')
df1=df.iloc[:,[4,5,6,7]]
df1.columns=['others','cosmetics','integration','medicine']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df1.index
y1,y2,y3,y4 = df1['others'], df1['cosmetics'], df1['integration'], df1['medicine']
ax.stackplot(x, [y1, y2, y3, y4], labels=['others', 'cosmetics', 'integration', 'medicine'])
ax.set_title('Sales' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df3=df.iloc[:,[4,5,6,7]]
df3=df3.pct_change()
df3.columns=['others_growth_rate','cosmetics_growth_rate','integration_growth_rate','medicine_growth_rate']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df3.index[0:]
y1,y2, y3, y4= df3['others_growth_rate'][0:], df3['cosmetics_growth_rate'][0:], df3['integration_growth_rate'][0:], df3['medicine_growth_rate'][0:]
#y5=[0]*len(df3['others_growth_rate'][0:-1])
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'm-')
ax.plot(x, y4, 'b-')
#ax.plot(x, y5, 'k--')
ax.set_title('Growth Rate' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df2=df.loc[:, ['others_gpr','cosmetics_gpr','integration_gpr','medicine_gpr']]
df2.columns=['others_gpr','cosmetics_gpr','integration_gpr','medicine_gpr']
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=df2.index
y1,y2, y3, y4 = df2['others_gpr'], df2['cosmetics_gpr'], df2['integration_gpr'], df2['medicine_gpr']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'k-')
ax.plot(x, y4, 'b-')
ax.set_title('GPR' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df.iloc[:,[4,5,6,7]].sort_index(ascending=False)
dfcash_all=pd.read_csv('600602/600602_cashflow.txt',index_col='index_date')
dfcash=dfcash_all.iloc[:,[24,39,51]].replace('--','0')
dfcash.columns=['Operating','Investing','Financing']
dfcash.sort_index(ascending=True, inplace=True)
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=dfcash.index
y1,y2, y3 = dfcash['Operating'], dfcash['Investing'], dfcash['Financing']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'b-')
ax.set_title('Cashflow' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df=dfcash_all.iloc[:,-5].to_frame().sort_index(ascending=True)
df.columns=['Cash balance']
print(df.plot(kind='bar',grid=True, figsize=(16,2), rot=0, secondary_y = True))
dfcash_all=pd.read_csv('300168/300168_cashflow.txt',index_col='index_date')
dfcash=dfcash_all.iloc[:,[24,39,51]].replace('--','0')
dfcash.columns=['Operating','Investing','Financing']
dfcash.sort_index(ascending=True, inplace=True)
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=dfcash.index
y1,y2, y3 = dfcash['Operating'], dfcash['Investing'], dfcash['Financing']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'b-')
ax.set_title('Cashflow' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df=dfcash_all.iloc[:,-5].to_frame().sort_index(ascending=True)
df.columns=['Cash balance']
print(df.plot(kind='bar',grid=True, figsize=(16,2), rot=0, secondary_y = True))
dfcash_all=pd.read_csv('300020/300020_cashflow.txt',index_col='index_date')
dfcash=dfcash_all.iloc[:,[24,39,51]].replace('--','0')
dfcash.columns=['Operating','Investing','Financing']
dfcash.sort_index(ascending=True, inplace=True)
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=dfcash.index
y1,y2, y3 = dfcash['Operating'], dfcash['Investing'], dfcash['Financing']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'b-')
ax.set_title('Cashflow' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df=dfcash_all.iloc[:,-5].to_frame().sort_index(ascending=True)
df.columns=['Cash balance']
print(df.plot(kind='bar',grid=True, figsize=(16,2), rot=0, secondary_y = True))
募集年份 | 募集方式 | 募集资金总额(万元) | 本期已使用募集资金总额(万元) | 已累计使用募集资金总额(万元) |
---|---|---|---|---|
2015年 | 非公开发行股票募集 | 98,091.89 | 31,842.46 | 31,842.46 |
dfcash_all=pd.read_csv('002373/002373_cashflow.txt',index_col='index_date')
dfcash=dfcash_all.iloc[:,[24,39,51]].replace('--','0')
dfcash.columns=['Operating','Investing','Financing']
dfcash.sort_index(ascending=True, inplace=True)
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=dfcash.index
y1,y2, y3 = dfcash['Operating'], dfcash['Investing'], dfcash['Financing']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'b-')
ax.set_title('Cashflow' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df=dfcash_all.iloc[:,-5].to_frame().sort_index(ascending=True)
df.columns=['Cash balance']
print(df.plot(kind='bar',grid=True, figsize=(16,2), rot=0, secondary_y = True))
募集年份 | 募集方式 | 募集资金总额(万元) |
---|---|---|
2015 | 非公开发行股票 | 177,387.33 |
dfcash_all=pd.read_csv('000662/000662_cashflow.txt',index_col='index_date')
dfcash=dfcash_all.iloc[:,[24,39,51]].replace('--','0')
dfcash.columns=['Operating','Investing','Financing']
dfcash.sort_index(ascending=True, inplace=True)
figure, ax=plt.subplots(1, 1, figsize=(16, 4))
x=dfcash.index
y1,y2, y3 = dfcash['Operating'], dfcash['Investing'], dfcash['Financing']
ax.plot(x, y1, 'r-')
ax.plot(x, y2, 'g-')
ax.plot(x, y3, 'b-')
ax.set_title('Cashflow' + '\nwww.jasper.wang')
ax.yaxis.set_ticks_position('right')
ax.grid(True)
ax.legend(loc=2)
plt.tight_layout()
plt.show()
df=dfcash_all.iloc[:,-5].to_frame().sort_index(ascending=True)
df.columns=['Cash balance']
print(df.plot(kind='bar',grid=True, figsize=(16,2), rot=0, secondary_y = True))
df_1=pd.read_csv('600602/600602_income_statement.txt',index_col='index_date')
df_1=df_1.iloc[:,1].to_frame()*10000
df_1.columns=['Sales']
df_2=pd.read_csv('600602/600602_banlance_sheet.txt',index_col='index_date')
df_2=df_2.iloc[:,[5,6]].replace('--','0').astype(float)*10000
df_2['ARNR']=df_2.apply(lambda x: x[0]+x[1], axis=1)
df_2=df_2.iloc[:,2].to_frame()
df=pd.concat([df_1,df_2], axis=1, sort=True)
print(df.plot(kind='bar',grid=True, figsize=(16,4), rot=0, secondary_y = True))
df_g=df.pct_change()
print(df_g.plot(kind='line',grid=True, figsize=(16,2), rot=0, secondary_y = True, xticks=range(len(df_g.index))))
df_1=pd.read_csv('300168/300168_income_statement.txt',index_col='index_date')
df_1=df_1.iloc[:,1].to_frame()*10000
df_1.columns=['Sales']
df_2=pd.read_csv('300168/300168_banlance_sheet.txt',index_col='index_date')
df_2=df_2.iloc[:,[5,6]].replace('--','0').astype(float)*10000
df_2['ARNR']=df_2.apply(lambda x: x[0]+x[1], axis=1)
df_2=df_2.iloc[:,2].to_frame()
df=pd.concat([df_1,df_2], axis=1, sort=True)
print(df.plot(kind='bar',grid=True, figsize=(16,4), rot=0, secondary_y = True))
df_g=df.pct_change()
print(df_g.plot(kind='line',grid=True, figsize=(16,2), rot=0, secondary_y = True, xticks=range(len(df_g.index))))
df_1=pd.read_csv('300020/300020_income_statement.txt',index_col='index_date')
df_1=df_1.iloc[:,1].to_frame()*10000
df_1.columns=['Sales']
df_2=pd.read_csv('300020/300020_banlance_sheet.txt',index_col='index_date')
df_2=df_2.iloc[:,[5,6]].replace('--','0').astype(float)*10000
df_2['ARNR']=df_2.apply(lambda x: x[0]+x[1], axis=1)
df_2=df_2.iloc[:,2].to_frame()
df=pd.concat([df_1,df_2], axis=1, sort=True)
print(df.plot(kind='bar',grid=True, figsize=(16,4), rot=0, secondary_y = True))
df_g=df.pct_change()
print(df_g.plot(kind='line',grid=True, figsize=(16,2), rot=0, secondary_y = True, xticks=range(len(df_g.index))))
df_1=pd.read_csv('002373/002373_income_statement.txt',index_col='index_date')
df_1=df_1.iloc[:,1].to_frame()*10000
df_1.columns=['Sales']
df_2=pd.read_csv('002373/002373_banlance_sheet.txt',index_col='index_date')
df_2=df_2.iloc[:,[5,6]].replace('--','0').astype(float)*10000
df_2['ARNR']=df_2.apply(lambda x: x[0]+x[1], axis=1)
df_2=df_2.iloc[:,2].to_frame()
df=pd.concat([df_1,df_2], axis=1, sort=True)
print(df.plot(kind='bar',grid=True, figsize=(16,4), rot=0, secondary_y = True))
df_g=df.pct_change()
print(df_g.plot(kind='line',grid=True, figsize=(16,2), rot=0, secondary_y = True, xticks=range(len(df_g.index))))
df_1=pd.read_csv('000662/000662_income_statement.txt',index_col='index_date')
df_1=df_1.iloc[:,1].to_frame()*10000
df_1.columns=['Sales']
df_2=pd.read_csv('000662/000662_banlance_sheet.txt',index_col='index_date')
df_2=df_2.iloc[:,[5,6]].replace('--','0').astype(float)*10000
df_2['ARNR']=df_2.apply(lambda x: x[0]+x[1], axis=1)
df_2=df_2.iloc[:,2].to_frame()
df=pd.concat([df_1,df_2], axis=1, sort=True)
print(df.plot(kind='bar',grid=True, figsize=(16,4), rot=0, secondary_y = True))
df_g=df.pct_change()
print(df_g.plot(kind='line',grid=True, figsize=(16,2), rot=0, secondary_y = True, xticks=range(len(df_g.index))))
df=pd.read_csv('PE.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,4].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,[1,2,3,4]].sort_index(ascending=False)
df=pd.read_csv('PB.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,4].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,[1,2,3,4]].sort_index(ascending=False)
df=pd.read_csv('PEG.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,5].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,[1,2,3,5]].sort_index(ascending=False)
df=pd.read_csv('PEG.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,6].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,[1,2,4,6]].sort_index(ascending=False)
import numpy as np
np.set_printoptions(suppress=True, threshold=np.nan)
pd.set_option('display.float_format', lambda x: '%.2f' % x) # 不以科学计数法显示(2f,保留2位小数)
df=pd.read_csv('PS.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,3].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,[0,2,1,3]].sort_index(ascending=False)
pd.set_option('display.float_format', lambda x: '%.2f' % x) # 不以科学计数法显示(2f,保留2位小数)
df=pd.read_csv('EV_EBITDA.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,4].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,:].sort_index(ascending=False)
pd.set_option('display.float_format', lambda x: '%.2f' % x) # 不以科学计数法显示(2f,保留2位小数)
df=pd.read_csv('EV_Sales.txt', dtype={'Stock':str}).set_index('Stock').sort_index()
df.iloc[:,4].plot(kind='barh',grid=True, figsize=(10,4), rot=0)
df.iloc[:,:].sort_index(ascending=False)