ó
x\c           @   s  d  Z  d d l m Z d e f d     YZ d e f d     YZ d e f d     YZ d	 e f d
     YZ	 d e f d     YZ
 d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d S(   s%   
Expose public exceptions & warnings
iÿÿÿÿ(   t   OutOfBoundsDatetimet   PerformanceWarningc           B   s   e  Z d  Z RS(   sI   
    Warning raised when there is a possible
    performance impact.
    (   t   __name__t
   __module__t   __doc__(    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR   
   s   t   UnsupportedFunctionCallc           B   s   e  Z d  Z RS(   sŽ   
    Exception raised when attempting to call a numpy function
    on a pandas object, but that function is not supported by
    the object e.g. ``np.cumsum(groupby_object)``.
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR      s   t   UnsortedIndexErrorc           B   s   e  Z d  Z RS(   sŠ   
    Error raised when attempting to get a slice of a MultiIndex,
    and the index has not been lexsorted. Subclass of `KeyError`.

    .. versionadded:: 0.20.0
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR      s   t   ParserErrorc           B   s   e  Z d  Z RS(   sL   
    Exception that is raised by an error encountered in `pd.read_csv`.
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR       s   t   DtypeWarningc           B   s   e  Z d  Z RS(   s²  
    Warning raised when reading different dtypes in a column from a file.

    Raised for a dtype incompatibility. This can happen whenever `read_csv`
    or `read_table` encounter non-uniform dtypes in a column(s) of a given
    CSV file.

    See Also
    --------
    pandas.read_csv : Read CSV (comma-separated) file into a DataFrame.
    pandas.read_table : Read general delimited file into a DataFrame.

    Notes
    -----
    This warning is issued when dealing with larger files because the dtype
    checking happens per chunk read.

    Despite the warning, the CSV file is read with mixed types in a single
    column which will be an object type. See the examples below to better
    understand this issue.

    Examples
    --------
    This example creates and reads a large CSV file with a column that contains
    `int` and `str`.

    >>> df = pd.DataFrame({'a': (['1'] * 100000 + ['X'] * 100000 +
    ...                          ['1'] * 100000),
    ...                    'b': ['b'] * 300000})
    >>> df.to_csv('test.csv', index=False)
    >>> df2 = pd.read_csv('test.csv')
    ... # DtypeWarning: Columns (0) have mixed types

    Important to notice that ``df2`` will contain both `str` and `int` for the
    same input, '1'.

    >>> df2.iloc[262140, 0]
    '1'
    >>> type(df2.iloc[262140, 0])
    <class 'str'>
    >>> df2.iloc[262150, 0]
    1
    >>> type(df2.iloc[262150, 0])
    <class 'int'>

    One way to solve this issue is using the `dtype` parameter in the
    `read_csv` and `read_table` functions to explicit the conversion:

    >>> df2 = pd.read_csv('test.csv', sep=',', dtype={'a': str})

    No warning was issued.

    >>> import os
    >>> os.remove('test.csv')
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR   &   s   7t   EmptyDataErrorc           B   s   e  Z d  Z RS(   s   
    Exception that is thrown in `pd.read_csv` (by both the C and
    Python engines) when empty data or header is encountered.
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR	   `   s   t   ParserWarningc           B   s   e  Z d  Z RS(   s:  
    Warning raised when reading a file that doesn't use the default 'c' parser.

    Raised by `pd.read_csv` and `pd.read_table` when it is necessary to change
    parsers, generally from the default 'c' parser to 'python'.

    It happens due to a lack of support or functionality for parsing a
    particular attribute of a CSV file with the requested engine.

    Currently, 'c' unsupported options include the following parameters:

    1. `sep` other than a single character (e.g. regex separators)
    2. `skipfooter` higher than 0
    3. `sep=None` with `delim_whitespace=False`

    The warning can be avoided by adding `engine='python'` as a parameter in
    `pd.read_csv` and `pd.read_table` methods.

    See Also
    --------
    pd.read_csv : Read CSV (comma-separated) file into DataFrame.
    pd.read_table : Read general delimited file into DataFrame.

    Examples
    --------
    Using a `sep` in `pd.read_csv` other than a single character:

    >>> import io
    >>> csv = u'''a;b;c
    ...           1;1,8
    ...           1;2,1'''
    >>> df = pd.read_csv(io.StringIO(csv), sep='[;,]')  # doctest: +SKIP
    ... # ParserWarning: Falling back to the 'python' engine...

    Adding `engine='python'` to `pd.read_csv` removes the Warning:

    >>> df = pd.read_csv(io.StringIO(csv), sep='[;,]', engine='python')
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR
   g   s   &t
   MergeErrorc           B   s   e  Z d  Z RS(   sx   
    Error raised when problems arise during merging due to problems
    with input data. Subclass of `ValueError`.
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR      s   t   NullFrequencyErrorc           B   s   e  Z d  Z RS(   sÅ   
    Error raised when a null `freq` attribute is used in an operation
    that needs a non-null frequency, particularly `DatetimeIndex.shift`,
    `TimedeltaIndex.shift`, `PeriodIndex.shift`.
    (   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR      s   t   AccessorRegistrationWarningc           B   s   e  Z d  Z RS(   s9   Warning for attribute conflicts in accessor registration.(   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR      s   t   AbstractMethodErrorc           B   s#   e  Z d  Z d d  Z d   Z RS(   s   Raise this error instead of NotImplementedError for abstract methods
    while keeping compatibility with Python 2 and Python 3.
    t   methodc         C   sU   d d d d h } | | k r? d j  | |  } t |   n  | |  _ | |  _ d  S(   NR   t   classmethodt   staticmethodt   propertys-   methodtype must be one of {}, got {} instead.(   t   formatt
   ValueErrort
   methodtypet   class_instance(   t   selfR   R   t   typest   msg(    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyt   __init__š   s    	c         C   sL   |  j  d k r |  j j } n |  j j j } d } | j d |  j  d |  S(   NR   s>   This {methodtype} must be defined in the concrete class {name}R   t   name(   R   R   R   t	   __class__R   (   R   R   R   (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyt   __str__±   s
    (   R   R   R   R   R   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyR   £   s   	N(   R   t   pandas._libs.tslibsR    t   WarningR   R   R   t   KeyErrorR   R   R   R	   R
   R   R   R   t   NotImplementedErrorR   (    (    (    s5   lib/python2.7/site-packages/pandas/errors/__init__.pyt   <module>   s   	:)