
    -e                        d Z ddlmZ ddlZ ej        e          ZddlmZ ddl	m
Z
 erddlZdZddZ e
dd          Z e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 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`

.. bokeh-sampledata-xref:: autompg
    )annotationsN)TYPE_CHECKING   )package_csv)autompgautompg_cleandfpd.DataFramereturnc                   |                                  } 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<   g dfd| j        D             | _        | S )z

    c                B    g | ]}|                                 d          S )r   )split).0xs     8lib/python3.11/site-packages/bokeh/sampledata/autompg.py
<listcomp>z_clean_data.<locals>.<listcomp>K   s$    ///!1///    mfr	chevroletchevy	chevroeltmazdamaxdamercedeszmercedes-benztoyotatoyouta
volkswagen	vokswagenvw)zNorth AmericaEuropeAsiac                &    g | ]}|d z
           S )    )r   r   ORIGINSs     r   r   z_clean_data.<locals>.<listcomp>U   s!    111!1111r   )copynamelocr   origin)r	   r%   s    @r   _clean_datar*   F   s     
B//rw///BuI'2BF26We#$+6BF26[ %'('.BF26We#$/9BF26_$e+,)1BF26Y%&+7BF26[ %'($0BF26T>5 !111G1111ry111BIIr   r   zauto-mpg.csv)r	   r
   r   r
   )__doc__
__future__r   logging	getLogger__name__logtypingr   util.sampledatar   pandaspd__all__r*   r   r   r$   r   r   <module>r6      s    . # " " " " " g!! !           * ) ) ) ) ) $   . +i
0
0G$$r   