a
    J¸Df"
  ã                   @  sv   d Z ddlmZ ddlZe e¡ZddlmZ er>ddl	m
Z
 ddlmZ dZd	d	d
œdd„Zddœdd„Zeƒ ZdS )a$   A version of the Auto MPG data set.

License: `CC0`_

Sourced from https://archive.ics.uci.edu/ml/datasets/auto+mpg

This module contains one pandas Dataframe: ``autompg``.

.. rubric:: ``autompg2``

:bokeh-dataframe:`bokeh.sampledata.autompg2.autompg2`

.. bokeh-sampledata-xref:: autompg2
é    )ÚannotationsN)ÚTYPE_CHECKING)Ú	DataFrameé   )Úpackage_csv)Úautompg2Ústr)ÚstringÚreturnc                 C  s   d  dd„ |  d¡D ƒ¡S )ú

    ú c                 s  s   | ]}|  ¡ V  qd S )N)Ú
capitalize)Ú.0Úword© r   úf/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/bokeh/sampledata/autompg2.pyÚ	<genexpr>C   ó    z$_capitalize_words.<locals>.<genexpr>)ÚjoinÚsplit)r	   r   r   r   Ú_capitalize_words?   s    r   r   )r
   c                  C  sP   t ddƒ ¡ } | d  t¡| d< | d  t¡| d< | d  dddd	œ¡| d< | S )
r   r   zauto-mpg2.csvZmanufacturerÚmodelÚdrvÚfrontZrearZ4x4)ÚfÚrÚ4)r   ÚcopyÚmapr   Úreplace)Zdfr   r   r   Ú
_read_dataE   s
    r    )Ú__doc__Ú
__future__r   ÚloggingÚ	getLoggerÚ__name__ÚlogÚtypingr   Zpandasr   Zutil.sampledatar   Ú__all__r   r    r   r   r   r   r   Ú<module>   s   
