跳转至

汽车销售数据

CarBrandListMapping

字段映射 汽车品牌列表

CarBrandList

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

查询 汽车品牌列表

Notes
data = CarBrandList().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\car\car_brand.py
def __init__(
        self,
        verbose: Optional[bool] = False,
        logger: Optional[Callable] = None,
        **kwargs: Any
):
    """
    Notes:
        ```python
        data = CarBrandList().load()
        data.to_frame(chinese_column=True)
        ```

    Args:
        verbose: 是否打印日志
        logger: 自定义日志打印函数
        **kwargs: 其他参数
    """
    self.mapping = CarBrandListMapping()
    self.verbose = verbose
    self.logger = logger
    self.kwargs = kwargs
    self.request_set(description="汽车品牌列表")

CarHistorySalesMapping

字段映射 汽车历史销量

CarHistorySales

CarHistorySales(
    data_type: Literal["汽车销量"] = "汽车销量",
    verbose: Optional[bool] = False,
    logger: Optional[Callable] = None,
    **kwargs: Any
)

查询 汽车历史销量

Notes
data = CarHistorySales(data_type="电动车销量",).load()
data.to_frame(chinese_column=True)

Parameters:

Name Type Description Default
data_type Literal['汽车销量']

查询类型

'汽车销量'
verbose Optional[bool]

是否打印日志

False
logger Optional[Callable]

自定义日志打印函数

None
**kwargs Any

其他参数

{}
Source code in wisecon\car\car_history_sales.py
def __init__(
        self,
        data_type: Literal["汽车销量"] = "汽车销量",
        verbose: Optional[bool] = False,
        logger: Optional[Callable] = None,
        **kwargs: Any
):
    """
    Notes:
        ```python
        data = CarHistorySales(data_type="电动车销量",).load()
        data.to_frame(chinese_column=True)
        ```

    Args:
        data_type: 查询类型
        verbose: 是否打印日志
        logger: 自定义日志打印函数
        **kwargs: 其他参数
    """
    self.data_type = data_type
    self.mapping = CarHistorySalesMapping()
    self.verbose = verbose
    self.logger = logger
    self.kwargs = kwargs
    self.request_set(description="汽车历史销量", response_type="html")
    self.data_mark = self.params_data_mark()
    self.params_multi_pages()

CurrentCarSalesMapping

字段映射 汽车当前销量排行榜

CurrentCarSales

CurrentCarSales(
    data_type: Literal[
        "销量",
        "品牌销量",
        "厂商销量",
        "车型级别",
        "车身类别",
        "车型销量",
        "电动车销量",
    ] = "销量",
    start_date: Optional[str] = None,
    end_date: Optional[str] = None,
    verbose: Optional[bool] = False,
    logger: Optional[Callable] = None,
    **kwargs: Any
)

查询 汽车当前销量排行榜

Notes
data = CurrentCarSales(data_type="电动车销量",).load()
data.to_frame(chinese_column=True)

Parameters:

Name Type Description Default
data_type Literal['销量', '品牌销量', '厂商销量', '车型级别', '车身类别', '车型销量', '电动车销量']

查询类型

'销量'
start_date Optional[str]

开始日期, %Y-%m

None
end_date Optional[str]

结束日期, %Y-%m

None
verbose Optional[bool]

是否打印日志

False
logger Optional[Callable]

自定义日志打印函数

None
**kwargs Any

其他参数

{}
Source code in wisecon\car\current_sales.py
def __init__(
        self,
        data_type: Literal["销量", "品牌销量", "厂商销量", "车型级别", "车身类别", "车型销量", "电动车销量"] = "销量",
        start_date: Optional[str] = None,
        end_date: Optional[str] = None,
        verbose: Optional[bool] = False,
        logger: Optional[Callable] = None,
        **kwargs: Any
):
    """
    Notes:
        ```python
        data = CurrentCarSales(data_type="电动车销量",).load()
        data.to_frame(chinese_column=True)
        ```

    Args:
        data_type: 查询类型
        start_date: 开始日期, %Y-%m
        end_date: 结束日期, %Y-%m
        verbose: 是否打印日志
        logger: 自定义日志打印函数
        **kwargs: 其他参数
    """
    self.data_type = data_type
    self.start_date = start_date
    self.end_date = end_date
    self.mapping = CurrentCarSalesMapping()
    self.verbose = verbose
    self.logger = logger
    self.kwargs = kwargs
    self.request_set(description="汽车当前销量排行榜")
    self.conditions = []
    self.validate_date_format(date=[start_date, end_date], _format="%Y-%m")