U
    ê¥¡c   ã                   @   sn   d dl Zd dlmZ ddlmZ ddlmZmZm	Z	m
Z
mZmZmZmZ ejddd„ƒZejd	d
„ ƒZdZdS )é    N)Úcurriedé   )Úsanitize_dataframe)ÚMaxRowsErrorÚcurryÚpipeÚsampleÚto_csvÚto_jsonÚ	to_valuesÚcheck_data_typeéˆ  c                 C   s@   t | ttjfƒs"td t| ƒ¡ƒ‚t| ƒ|kr<td |¡ƒ‚| S )z<Raise MaxRowsError if the data model has more than max_rows.z#Expected dict or DataFrame, got: {}z@The number of rows in your dataset is greater than the max of {})	Ú
isinstanceÚlistÚpdZ	DataFrameÚ	TypeErrorÚformatÚtypeÚlenr   )ÚdataZmax_rows© r   ú4/tmp/pip-unpacked-wheel-y9_o96ar/altair/vega/data.pyÚ
limit_rows   s    ÿÿr   c                 C   s   t  | tt¡S )N)r   r   r   r   )r   r   r   r   Údefault_data_transformer   s    r   )r   r   r   r   r   r   r   r	   r
   r   r   )r   )Zpandasr   Ztoolzr   Z
utils.corer   Z
utils.datar   r   r   r   r	   r
   r   r   r   r   Ú__all__r   r   r   r   Ú<module>   s   (
