Spaces:
Runtime error
Runtime error
{ | |
"get_Financial_data_from_time_range(stock_code:str, start_date:str, end_date:str, financial_index:str='') -> pd.DataFrame:\n": "# 例如 输入start_date='20190101',end_date='20221231',financial_index='roe', 则返回的是2019年到2022整三年的roe数据\n # 查询某个时刻的季报年报数据则 \"yyyy0331\"为一季报,\"yyyy0630\"为半年报,\"yyyy0930\"为三季报,\"yyyy1231\"为年报,例如get_Financial_data_from_time_range(\"600519.SH\", \"20190331\", \"20190331\", \"roe\").代表查询2019年一季报中roe数据\n # index包含: # current_ratio\t流动比率 # quick_ratio\t速动比率 # netprofit_margin\t销售净利率 # grossprofit_margin\t销售毛利率 # roe\t净资产收益率 # roe_dt\t净资产收益率(扣除非经常损益)\n # roa\t总资产报酬率 # debt_to_assets 资产负债率 # roa_yearly\t年化总资产净利率 # q_dtprofit\t扣除非经常损益后的单季度净利润 # q_eps\t每股收益(单季度)\n # q_netprofit_margin\t销售净利率(单季度) # q_gsprofit_margin\t销售毛利率(单季度) # basic_eps_yoy 基本每股收益同比增长率(%) # netprofit_yoy\t归属母公司股东的净利润同比增长率(%) # q_netprofit_yoy\t归属母公司股东的净利润同比增长率(%)(单季度) # q_netprofit_qoq\t归属母公司股东的净利润环比增长率(%)(单季度) # equity_yoy\t净资产同比增长率\n \"\"\"\n Retrieves the financial data for a given stock within a specified date range.\n\n Args:\n stock_code (str): The stock code.\n start_date (str): The start date of the data range in the format \"YYYYMMDD\".\n end_date (str): The end date of the data range in the format \"YYYYMMDD\".\n financial_index (str, optional): The financial indicator to be queried.\n\n Returns:\n pd.DataFrame: A DataFrame containin financial data for the specified stock and date range.\n\n\"\"\"", | |
"get_company_info(stock_name: str='') -> pd.DataFrame:\n": "# 获取公司信息,包括ts_code: str\t股票代码, exchange:str\t交易所代码SSE上交所 SZSE深交所, chairman:str 法人代表, manager:str 总经理, secretary:str\t董秘 # reg_capital:float\t注册资本, setup_date:str 注册日期, province:str 所在省份 ,city:str 所在城市\n # introduction:str 公司介绍, website:str 公司主页 , email:str\t电子邮件, office:str 办公室 # ann_date: str 公告日期, business_scope:str 经营范围, employees:int\t员工人数, main_business:str 主要业务及产品\n \"\"\"\n This function retrieves company information including stock code, exchange, chairman, manager, secretary,\n registered capital, setup date, province, city, website, email, employees, business scope, main business,\n introduction, office, and announcement date.\n\n Args:\n - stock_name (str): The name of the stock.\n\n Returns:\n - pd.DataFrame: A DataFrame that contains the company information.\n \"\"\"", | |
"get_stock_code(stock_name: str) -> str:\n": "\"\"\"\n # Retrieve the stock code of a given stock name. '600519.SH'=get_stock_code('贵州茅台')", | |
"loop_rank(df: pd.DataFrame, func: callable, *args, **kwargs) -> pd.DataFrame:\n": "\"\"\"\n It iteratively applies the given function to each row and get a result using function. It then stores the calculated result in 'new_feature' column.\n\n Args:\n df: DataFrame with a single column\n func : The function to be applied to each row: func(row, *args, **kwargs)\n *args: Additional positional arguments for `func` function.\n **kwargs: Additional keyword arguments for `func` function.\n\n Returns:\n pd.DataFrame: A output DataFrame with three columns: the constant column, input column, and new_feature column.\n The DataFrame is sorted based on the new_feature column in descending order.\n\n \"\"\"", | |
"get_index_constituent(index_name:str='',start_date:str ='',end_date:str ='') -> pd.DataFrame:\n": "\"\"\"\n Get the constituents and weights of a stock index within a given time period.\n\n args:\n index_name: the name of the index.\n start_date: the start date in \"YYYYMMDD\".\n end_date: the end date in \"YYYYMMDD\".\n\n return:\n A pandas DataFrame containing the following columns:\n index_code\n weight: the weight of the constituent stock.\n index_name\n stock_code: the code of the constituent stock.\n stock_name: the name of the constituent stock.\n industry: the industry of the constituent stock.\n market: 上交所或证交所\n \"\"\"", | |
"select_value_by_column(df1:pd.DataFrame, col_name: str = '', row_index: int = -1) -> Union[pd.DataFrame, Any]:\n": "\"\"\"\n Selects a specific column or a specific value within a DataFrame.\n\n Args:\n df1: The input DataFrame.\n col_name: The name of the column to be selected.\n row_index: The index of the row to be selected.\n\n Returns:\n Union[pd.DataFrame, Any]. row_index=-1: df1[col_name].to_frame() or df1[col_name][row_index]\n \"\"\"" | |
} | |