跳转至

行业/地区/概念编码

PlateCodeMapping

字段映射 行业、概念、地区编码数据

PlateCode

PlateCode(
    plate_type: Optional[
        Literal["行业", "概念", "地区"]
    ] = None,
    size: Optional[int] = 500,
    verbose: Optional[bool] = False,
    logger: Optional[Callable] = None,
    **kwargs: Any
)

查询 行业、概念、地区编码数据

Notes
from wisecon.stock.capital_flow import *

# 1. 查询有哪些概念板块
data = PlateCode(plate_type="概念").load()
data.to_frame(chinese_column=True)

# 2. 查询有哪些地区板块
data = PlateCode(plate_type="地区").load()
data.to_frame(chinese_column=True)

# 3. 查询有哪些行业板块
data = PlateCode(plate_type="行业").load()
data.to_frame(chinese_column=True)

Parameters:

Name Type Description Default
plate_type Optional[Literal['行业', '概念', '地区']]

板块类型, ["行业", "概念", "地区"]

None
size Optional[int]

返回数据量

500
verbose Optional[bool]

是否打印日志

False
logger Optional[Callable]

自定义日志函数

None
**kwargs Any

其他参数

{}
Source code in wisecon\stock\plate_mapping\plate.py
def __init__(
        self,
        plate_type: Optional[Literal["行业", "概念", "地区"]] = None,
        size: Optional[int] = 500,
        verbose: Optional[bool] = False,
        logger: Optional[Callable] = None,
        **kwargs: Any
):
    """
    Notes:
        ```python
        from wisecon.stock.capital_flow import *

        # 1. 查询有哪些概念板块
        data = PlateCode(plate_type="概念").load()
        data.to_frame(chinese_column=True)

        # 2. 查询有哪些地区板块
        data = PlateCode(plate_type="地区").load()
        data.to_frame(chinese_column=True)

        # 3. 查询有哪些行业板块
        data = PlateCode(plate_type="行业").load()
        data.to_frame(chinese_column=True)
        ```

    Args:
        plate_type: 板块类型, `["行业", "概念", "地区"]`
        size: 返回数据量
        verbose: 是否打印日志
        logger: 自定义日志函数
        **kwargs: 其他参数
    """
    self.plate_type = plate_type
    self.size = size
    self.mapping = PlateCodeMapping()
    self.verbose = verbose
    self.logger = logger
    self.kwargs = kwargs
    self.request_set(description="行业、概念、地区编码数据", )

IndustryCodeMapping

字段映射 行业编码数据

IndustryCode

IndustryCode(
    verbose: Optional[bool] = False,
    logger: Optional[Callable] = None,
    **kwargs: Any
)

查询 行业编码数据

Notes
from wisecon.stock.plate_mapping import *

# 1. 查询有哪些行业编码
data = IndustryCode().load()
data.to_frame(chinese_column=True)

Parameters:

Name Type Description Default
verbose Optional[bool]

是否打印日志

False
logger Optional[Callable]

自定义日志函数

None
**kwargs Any

其他参数

{}
Source code in wisecon\stock\plate_mapping\industry.py
def __init__(
        self,
        verbose: Optional[bool] = False,
        logger: Optional[Callable] = None,
        **kwargs: Any
):
    """
    Notes:
        ```python
        from wisecon.stock.plate_mapping import *

        # 1. 查询有哪些行业编码
        data = IndustryCode().load()
        data.to_frame(chinese_column=True)
        ```

    Args:
        verbose: 是否打印日志
        logger: 自定义日志函数
        **kwargs: 其他参数
    """
    self.mapping = IndustryCodeMapping()
    self.verbose = verbose
    self.logger = logger
    self.kwargs = kwargs
    self.request_set(description="行业编码数据", )