提交 e905e90d 编写于 作者: L linkedin_21843693

Auto Commit

上级 2eebcf6c
run = "pip install -r requirements.txt;python main.py"
language = "python"
[packager]
AUTO_PIP = true
......@@ -9,4 +10,7 @@ PATH = "${VIRTUAL_ENV}/bin:${PATH}"
PYTHONPATH = "$PYTHONHOME/lib/python3.10:${VIRTUAL_ENV}/lib/python3.10/site-packages"
REPLIT_POETRY_PYPI_REPOSITORY = "http://mirrors.csdn.net.cn/repository/csdn-pypi-mirrors/simple"
MPLBACKEND = "TkAgg"
POETRY_CACHE_DIR = "/root/${PROJECT_DIR}/.cache/pypoetry"
\ No newline at end of file
POETRY_CACHE_DIR = "/root/${PROJECT_DIR}/.cache/pypoetry"
[debugger]
program = "main.py"
print('欢迎来到 InsCode')
\ No newline at end of file
import efinance as ef
reports = ef.stock.get_all_report_dates()
print(reports.head(10))
date_report = input("请选择报告日期,如选择第一个请输入0:")
try:
date_report_index = int(date_report)
except:
print("输入序号有误,默认选择最新")
date_report_index = 0
df_repo = ef.stock.get_all_company_performance(reports.iloc[date_report_index]['报告日期'])
stock_demo = df_repo.iloc[3]
print("例子:财报日期:", reports.iloc[date_report_index]['报告日期'], "股票代码: ", stock_demo["股票代码"], "股票简称:", stock_demo["股票简称"])
print("==========详细股票信息==============")
print(ef.stock.get_base_info(stock_demo["股票代码"]))
print("==========演示结束==============")
while True:
stock_code = input("请输入股票代码:(输入‘end’结束程序)")
if stock_code == "end":
break
print("财报日期:", reports.iloc[date_report_index]['报告日期'], "股票代码: ", stock_code)
print("==========详细股票信息==============")
print(ef.stock.get_base_info(stock_code))
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册