U
    õÕ/e  ã                   @  sP   d Z ddlmZ ddlZe e¡ZddlmZ dZ	dd„ Z
ed	d
ƒZe
eƒZdS )a§   A version of the Auto MPG data set.

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

This module contains two pandas Dataframes: ``autompg`` and ``autompg_clean``.
The "clean" version has cleaned up the ``"mfr"`` and ``"origin"`` fields.

.. rubric:: ``autompg``

:bokeh-dataframe:`bokeh.sampledata.autompg.autompg`

.. rubric:: ``autompg_clean``

:bokeh-dataframe:`bokeh.sampledata.autompg.autompg_clean`

é    )ÚannotationsNé   )Úpackage_csv)ÚautompgÚautompg_cleanc                   sÌ   |   ¡ } dd„ | jD ƒ| d< d| j| jdkdf< d| j| jdkdf< d| j| jdkdf< d	| j| jd
kdf< d| j| jdkdf< d| j| jdkdf< d| j| jdkdf< dddg‰ ‡ fdd„| jD ƒ| _| S )z

    c                 S  s   g | ]}|  ¡ d  ‘qS )r   )Úsplit©Ú.0Úx© r   ú</tmp/pip-unpacked-wheel-f5fndrjf/bokeh/sampledata/autompg.pyÚ
<listcomp>B   s     z_clean_data.<locals>.<listcomp>ÚmfrZ	chevroletZchevyZ	chevroeltZmazdaZmaxdaZmercedeszmercedes-benzZtoyotaZtoyoutaZ
volkswagenZ	vokswagenZvwzNorth AmericaZEuropeZAsiac                   s   g | ]}ˆ |d   ‘qS )é   r   r   ©ZORIGINSr   r   r   L   s     )ÚcopyÚnameÚlocr   Úorigin)Zdfr   r   r   Ú_clean_data=   s    
r   r   zauto-mpg.csv)Ú__doc__Ú
__future__r   ÚloggingÚ	getLoggerÚ__name__ÚlogZutil.sampledatar   Ú__all__r   r   r   r   r   r   r   Ú<module>   s   

