
x\c           @   s  d  Z  d d l m Z d d l Z d d l Z d d l j Z d d l m Z m	 Z	 m
 Z
 m Z m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z m Z m Z d d	 l m Z m Z m Z m Z d d
 l m  Z  d d l! j" j# Z$ d d l% m& Z& d d l' m( Z( m) Z) d d l* m+ Z+ m, Z, m- Z- m. Z. d d l/ j" j0 j1 Z2 d d l3 m4 Z4 d d l5 m6 Z6 m7 Z7 m8 Z8 d d l9 j" j: Z: d d l; m< Z< d d l= m> Z> d d l? m@ Z@ eA d d d d d d d d d d d d  ZB d jC d eB d  eB d <d    ZD eE d!  ZF d e( f d"     YZG eG jH d d# d$ d% g d& d' d( d) d* i d$ d+ 6d% d, 6d- i d. d$ 6d/ d% 6d0 i   e: jI eG  e: jJ eG  eG jK   d S(1   sO   
Contains data structures designed for manipulating panel (3-dimensional) data
i(   t   divisionN(   t   OrderedDictt   mapt   ranget   ut   zip(   t   function(   t   Appendert   Substitutiont   deprecate_kwarg(   t   validate_axis_style_args(   t   cast_scalar_to_arrayt   infer_dtype_from_scalart   maybe_cast_item(   t
   is_integert   is_list_liket	   is_scalart   is_string_like(   t   notna(   t	   DataFrame(   t   NDFramet   _shared_docs(   t   Indext
   MultiIndext   _get_objs_combined_axist   ensure_index(   t   maybe_droplevels(   t   BlockManagert    create_block_manager_from_arrayst    create_block_manager_from_blocks(   t   cartesian_product(   t   Series(   t   pprint_thingt   axess   items, major_axis, minor_axist   klasst   Panelt   axes_single_args.   {0, 1, 2, 'items', 'major_axis', 'minor_axis'}t   optional_mappert    t   optional_axist   optional_labelss3   three positional arguments: each one of
{ax_single}t	   ax_singlet   args_transposec         C   s   t  |   } t  |  } t j |  } t j |   } t  |  | k rc t j | t  |   }  n  t  |  | k r t j | t  |   } n  |  | f S(   s:   
    Makes sure that time and panels are conformable.
    (   t   lent   npt   uniquet   tilet   repeat(   t   timet   panelst   n_timet   n_panelt   u_panelst   u_time(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _ensure_like_indices1   s    c         C   sO   | d k r d d g } n  t |  |  \ }  } t j |  | g d d d | S(   s`  
    Returns a multi-index suitable for a panel-like DataFrame.

    Parameters
    ----------
    time : array-like
        Time index, does not have to repeat
    panels : array-like
        Panel index, does not have to repeat
    names : list, optional
        List containing the names of the indices

    Returns
    -------
    multi_index : MultiIndex
        Time index is the first level, the panels are the second level.

    Examples
    --------
    >>> years = range(1960,1963)
    >>> panels = ['A', 'B', 'C']
    >>> panel_idx = panel_index(years, panels)
    >>> panel_idx
    MultiIndex([(1960, 'A'), (1961, 'A'), (1962, 'A'), (1960, 'B'),
                (1961, 'B'), (1962, 'B'), (1960, 'C'), (1961, 'C'),
                (1962, 'C')], dtype=object)

    or

    >>> years = np.repeat(range(1960,1963), 3)
    >>> panels = np.tile(['A', 'B', 'C'], 3)
    >>> panel_idx = panel_index(years, panels)
    >>> panel_idx
    MultiIndex([(1960, 'A'), (1960, 'B'), (1960, 'C'), (1961, 'A'),
                (1961, 'B'), (1961, 'C'), (1962, 'A'), (1962, 'B'),
                (1962, 'C')], dtype=object)
    R0   t   panelt	   sortordert   namesN(   t   NoneR6   R   t   from_arrays(   R0   R1   R9   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   panel_index@   s    &c        	   B   s  e  Z d  Z e d    Z e Z dP dP dP dP e dP d  Z	 d   Z
 dP d  Z d   Z e e d dP d   Z d   Z d	   Z dP e d
  Z d   Z d   Z d   Z d   Z e Z d   Z d dP d  Z d   Z d   Z d   Z e j e _ d   Z d   Z e j e _ d   Z d   Z d   Z  d d  Z! d d  Z" d d  Z# d d  Z$ d    Z% d!   Z& d d" e d#  Z' d d$  Z( d%   Z) d d&  Z* d'   Z+ d(   Z, d)   Z- d* d+  Z. e. Z/ d d,  Z0 d- d.  Z1 e2 d/  Z3 d- d0  Z4 d1   Z5 d2   Z6 d e2 dP dP d3  Z7 dP d4  Z8 d5   Z9 e: e;   e< e= j> j  d6     Z> e: e;   e< e= j? j  dP dP dP d7    Z? e< e@ d8 e;  d dP dP e2 dP eA jB d9   ZC e: e;   e< e= jD j  d:     ZD e: e;   e< e= jE j  dP dP dP e dP dP d;    ZE d- d<  ZF d* dP d- d=  ZG d* dP d- d>  ZH d? d d d@  ZI eJ dA dB dC dD dE i dF e 6dG e2 6 d? e2 dP dF dH   ZK dI   ZL eM dJ    ZN eM dK    ZO eM e2 dL   ZP eM e2 dP dM   ZQ eM d e dN   ZR dO   ZS RS(Q   sM  
    Represents wide format panel data, stored as 3-dimensional array.

    .. deprecated:: 0.20.0
        The recommended way to represent 3-D data are with a MultiIndex on a
        DataFrame via the :attr:`~Panel.to_frame()` method or with the
        `xarray package <http://xarray.pydata.org/en/stable/>`__.
        Pandas provides a :attr:`~Panel.to_xarray()` method to automate this
        conversion.

    Parameters
    ----------
    data : ndarray (items x major x minor), or dict of DataFrames
    items : Index or array-like
        axis=0
    major_axis : Index or array-like
        axis=1
    minor_axis : Index or array-like
        axis=2
    copy : boolean, default False
        Copy data from inputs. Only affects DataFrame / 2d ndarray input
    dtype : dtype, default None
        Data type to force, otherwise infer
    c         C   s
   t  |   S(   N(   t   type(   t   self(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _constructor   s    c         C   sH   t  j d t d d |  j d | d | d | d | d | d	 |  d  S(
   Nsd  
Panel is deprecated and will be removed in a future version.
The recommended way to represent these types of 3-dimensional data are with a MultiIndex on a DataFrame, via the Panel.to_frame() method
Alternatively, you can use the xarray package http://xarray.pydata.org/en/stable/.
Pandas provides a `.to_xarray()` method to help automate this conversion.
t
   stackleveli   t   datat   itemst
   major_axist
   minor_axist   copyt   dtype(   t   warningst   warnt   FutureWarningt
   _init_data(   R>   RA   RB   RC   RD   RE   RF   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   __init__   s    		c      	   K   s  | d k r i  } n  | d k	 r3 |  j |  } n  g  |  j D] } | j | d  ^ q= } | r t d j t | j    d    n  d } t | t	  r t
 j |   r g  t | | j  D]$ \ } }	 | d k	 r | n |	 ^ q } n  | }
 n t | t  r,|  j | | d | }
 t } d } n t | t j t f  rq|  j | | d | d | }
 t } d } n t |  rt
 j |   rt g  | D] } t |  ^ q| d | } |  j | | d | j d t }
 t } n t d   t j |  |
 d | d | d | d S(   sf   
        Generate ND initialization; axes are passed
        as required objects to __init__.
        s5   _init_data() got an unexpected keyword argument "{0}"i    RF   RE   s&   Panel constructor not properly called!R!   N(   R:   t   _validate_dtypet   _AXIS_ORDERSt   popt	   TypeErrort   formatt   listt   keyst
   isinstanceR   t   comt   _any_not_noneR   R!   t   dictt
   _init_dictt   FalseR,   t   ndarrayt   _init_matrixR   t   _all_not_noneR   R+   RF   t
   ValueErrorR   RK   (   R>   RA   RE   RF   t   kwargst   at   passed_axesR!   t   xt   yt   mgrt   values(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRJ      s<    	(	=					c            s  | j  |  j      d  k	 rR t      t   f d   t j |  D  } n t j |  } t	 |    xB t j |  D]1 \ } } t
 | t  r} |  j |  | | <q} q} Wg  t |  D]6 \ } } | d  k r |  j |  | d | n | ^ q }	 |  j |  |	  }
 g  } g  |	 D] } t |  ^ q} x   D] } | j |  } } | d  k rt j | d | } | j t j  na t
 | |  j  r|
 j   } t | d <| j |   } | d  k	 r| j |  } n  | j } n  | j |  q9W|  j |     g |	  S(   Nc         3   s-   |  ]# \ } } |   k r | | f Vq d  S(   N(    (   t   .0t   kt   v(   t   haxis(    s0   lib/python2.7/site-packages/pandas/core/panel.pys	   <genexpr>   s   	t   axisRF   RE   (   RN   t   _info_axis_numberR:   R   R   t   compatt	   iteritemsRT   t   dict_keys_to_ordered_listR   RS   RV   t   _constructor_slicedt	   enumeratet   _extract_axist   _extract_axes_for_sliceR+   t   getR,   t   emptyt   fillt   nanRE   RX   t   reindext   astypeRc   t   appendt   _init_arrays(   R>   RA   R!   RF   RR   Re   Rf   t   iR^   t   raxest   raxes_smt   arrayst   haxis_shapet   hRc   t   d(    (   Rg   s0   lib/python2.7/site-packages/pandas/core/panel.pyRW      s:    F
c         C   s   t  | | |  S(   N(   R   (   R>   R|   t	   arr_namesR!   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRx      s    RB   c         C   s  d d l  m } | j   } | d k r | t  } xK t j |  D]: \ } } x+ t j |  D] \ }	 }
 |
 | |	 | <q` WqD W| } n | d k r t d   n  |  j |  | d | d | } t | d j	    } t
 | d t  st t |   } n  t |  | |  j <|  |   S(	   s  
        Construct Panel from dict of DataFrame objects.

        Parameters
        ----------
        data : dict
            {field : DataFrame}
        intersect : boolean
            Intersect indexes of input DataFrames
        orient : {'items', 'minor'}, default 'items'
            The "orientation" of the data. If the keys of the passed dict
            should be the items of the result panel, pass 'items'
            (default). Otherwise if the columns of the values of the passed
            DataFrame objects should be the items (which in the case of
            mixed-dtype data you should do), instead pass 'minor'
        dtype : dtype, default None
            Data type to force, otherwise infer

        Returns
        -------
        Panel
        i(   t   defaultdictt   minorRB   s*   Orientation must be one of {items, minor}.t	   intersectRF   RA   (   t   collectionsR   t   lowerR   Rj   Rk   R\   t   _homogenize_dictRQ   RR   RS   t   sortedR   t   _info_axis_name(   t   clsRA   R   t   orientRF   R   t   new_datat   colt   dft   itemt   sR   t   ks(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt	   from_dict   s     	c         C   sm   t  j | |   } t |  j t  r1 |  j |  St |  pI t | t  sb t t	 |   j
 |  S|  j | S(   N(   RT   t   apply_if_callableRS   t
   _info_axisR   t   _getitem_multilevelR   t   slicet   superR#   t   __getitem__t   loc(   R>   t   key(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s    c   
      C   s   |  j  } | j |  } t | t t j f  r | | } t | |  } | g t d   g |  j d } |  j	 | } |  j
 |  j d  } | | |  j <|  j | |  }	 |	 S|  j |  Sd  S(   Ni   (   R   t   get_locRS   R   R,   RY   R   R:   t	   _AXIS_LENRc   t   _construct_axes_dictRM   R   R?   t   _get_item_cache(
   R>   R   t   infoR   t	   new_indext   result_indext   slicest
   new_valuesR   t   result(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR   &  s    	
!c   
      C   s   |  j  |  | d | } | d  k	 rf y | j |  } Wqf t k
 rb t d j d |    qf Xn  | j } g  } xU t |  D]G \ } }	 |	 d  k r t j	 | |  }	 n t
 |	  }	 | j |	  q Wt | g |  S(   NRE   s   failed to cast to {datatype}t   datatype(   t   _prep_ndarrayR:   Rv   t	   ExceptionR\   RP   t   shapeRn   t   ibaset   default_indexR   Rw   R   (
   R>   RA   R!   RF   RE   Rc   R   t
   fixed_axesRy   t   ax(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRZ   6  s    	c            sb    j    s t d   n      f d    j D }  j d t  }  j d | |  S(   Ns6   Can only compare identically-labeled same type objectsc            s*   i  |  ]  }    |  |  |  q S(    (    (   Rd   R   (   t   funct   otherR>   (    s0   lib/python2.7/site-packages/pandas/core/panel.pys
   <dictcomp>S  s   	RE   RA   (   t   _indexed_sameR   R   R   RX   R?   (   R>   R   R   R   R   (    (   R   R   R>   s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _compare_constructorN  s    c            s   t    j  } t d j d d j g  t   j   j  D]$ \ } } d j d | d |  ^ q7    }   f d   } d j | | g g    j D] } | |  ^ q  } | S(	   s   
        Return a string representation for a particular Panel.

        Invoked by unicode(df) in py2 only.
        Yields a Unicode String in both py2/py3.
        s   Dimensions: {dimensions}t
   dimensionss    x s   {shape} ({axis})R   Rh   c      
      s}   t    |   } t |  d k r] t d j d |  j   d t | d  d t | d    St d j d |  j     Sd  S(   Ni    s   {ax} axis: {x} to {y}R   R`   Ra   is   {ax} axis: None(   t   getattrR+   R   RP   t
   capitalizeR    (   R^   Rf   (   R>   (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   axis_prettyj  s    s   
(   t   strt	   __class__R   RP   t   joinR   RM   R   (   R>   t
   class_nameRh   R   t   dimsR   R^   t   output(    (   R>   s0   lib/python2.7/site-packages/pandas/core/panel.pyt   __unicode__\  s    F	/c         C   sj   |  j  |  } | d k r* d } d } n  | d k rE d } d } n | d k r` d } d } n  | | f S(   s   
        Get my plane axes indexes: these are already
        (as compared with higher level planes),
        as we are returning a DataFrame axes indexes.
        RC   RD   RB   (   t   _get_axis_name(   R>   Rh   t	   axis_namet   indext   columns(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _get_plane_axes_indexw  s    			c         C   s)   g  |  j  |  D] } |  j |  ^ q S(   s   
        Get my plane axes indexes: these are already
        (as compared with higher level planes),
        as we are returning a DataFrame axes.
        (   R   t	   _get_axis(   R>   Rh   t   axi(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _get_plane_axes  s    c         O   s   t  d   d S(   s   
        NOT IMPLEMENTED: do not call this method, as sparsifying is not
        supported for Panel objects and will raise an error.

        Convert to SparsePanel.
        s.   sparsifying is not supported for Panel objectsN(   t   NotImplementedError(   R>   t   argsR]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt	   to_sparse  s    R&   c   
      K   s   d d l  m } t | t j  r7 | | d | } n | } | | d <x9 |  j   D]+ \ } } t |  }	 | j | |	 |  qT W| j   d S(   s  
        Write each DataFrame in Panel to a separate excel sheet.

        Parameters
        ----------
        path : string or ExcelWriter object
            File path or existing ExcelWriter
        na_rep : string, default ''
            Missing data representation
        engine : string, default None
            write engine to use - you can also set this via the options
            ``io.excel.xlsx.writer``, ``io.excel.xls.writer``, and
            ``io.excel.xlsm.writer``.

        Other Parameters
        ----------------
        float_format : string, default None
            Format string for floating point numbers
        cols : sequence, optional
            Columns to write
        header : boolean or list of string, default True
            Write out column names. If a list of string is given it is
            assumed to be aliases for the column names
        index : boolean, default True
            Write row names (index)
        index_label : string or sequence, default None
            Column label for index column(s) if desired. If None is given, and
            `header` and `index` are True, then the index names are used. A
            sequence should be given if the DataFrame uses MultiIndex.
        startrow : upper left cell row to dump data frame
        startcol : upper left cell column to dump data frame

        Notes
        -----
        Keyword arguments (and na_rep) are passed to the ``to_excel`` method
        for each DataFrame written.
        i(   t   ExcelWritert   enginet   na_repN(	   t   pandas.io.excelR   RS   Rj   t   string_typesRk   R   t   to_excelt   save(
   R>   t   pathR   R   R]   R   t   writerR   R   t   name(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s    &
c         C   s   |  j    |  j j   S(   N(   t   _consolidate_inplacet   _datat   as_array(   R>   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt	   as_matrix  s    
c         O   s&   t  j d t d d |  j | |   S(   s  
        Quickly retrieve single value at (item, major, minor) location.

        .. deprecated:: 0.21.0

        Please use .at[] or .iat[] accessors.

        Parameters
        ----------
        item : item label (panel item)
        major : major axis label (panel item row)
        minor : minor axis label (panel item column)
        takeable : interpret the passed labels as indexers, default False

        Returns
        -------
        value : scalar value
        sm   get_value is deprecated and will be removed in a future release. Please use .at[] or .iat[] accessors insteadR@   i   (   RG   RH   RI   t
   _get_value(   R>   R   R]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt	   get_value  s    	c         O   s   t  |  } |  j } | | k r< t d j | |    n  | j d d   } | r| t d j t | j    d    n  | t k r |  j	 | d  } n |  j
 | d  } | j d | | d  S(   NsP   There must be an argument for each axis, you gave {0} args, but {1} are requiredt   takeables4   get_value() got an unexpected keyword argument "{0}"i    i   (   R+   R   RO   RP   RN   R:   RQ   RR   t   Truet   _iget_item_cacheR   R   (   R>   R   R]   t   nargst   nreqR   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s    			c         O   s&   t  j d t d d |  j | |   S(   sX  
        Quickly set single value at (item, major, minor) location.

        .. deprecated:: 0.21.0

        Please use .at[] or .iat[] accessors.

        Parameters
        ----------
        item : item label (panel item)
        major : major axis label (panel item row)
        minor : minor axis label (panel item column)
        value : scalar
        takeable : interpret the passed labels as indexers, default False

        Returns
        -------
        panel : Panel
            If label combo is contained, will be reference to calling Panel,
            otherwise a new object
        sm   set_value is deprecated and will be removed in a future release. Please use .at[] or .iat[] accessors insteadR@   i   (   RG   RH   RI   t
   _set_value(   R>   R   R]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt	   set_value
  s    	c         O   s  t  |  } |  j d } | | k r@ t d j | |    n  | j d d   } | r t d j t | j    d    n  yT | t k r |  j	 | d  } n |  j
 | d  } | j d | | d  |  SWn t k
 r|  j |  } |  j |  | d t } |  j |   }	 t |  } t | d  \ }
 | d <t j | d |  j  } | rwt |	 | d |
  n  |	 j |   SXd  S(   Ni   sh   There must be an argument for each axis plus the value provided, you gave {0} args, but {1} are requiredR   s4   set_value() got an unexpected keyword argument "{0}"i    RE   i(   R+   R   RO   RP   RN   R:   RQ   RR   R   R   R   R   t   KeyErrort   _expand_axest   _construct_axes_dict_fromRX   Ru   R   R,   t   array_equalR   R   (   R>   R   R]   R   R   R   R   R!   R   R   t   likely_dtypet   made_bigger(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR   &  s2    		c         C   sj   |  j  | j  k rD |  j |  } | j d  j r@ | | } n  | S|  j |  j d  } |  j | |  S(   Ni    i   (   t   ndimR?   R   t	   is_uniquet   _construct_axes_dict_for_sliceRM   Rm   (   R>   R   Rc   R   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _box_item_valuesK  s    c         C   s=  t  j | |   } t |  j  } t | |  j  r^ | j |  j |  j d    } | j	 } n t | t
 j  r | j | d k r t d j | d t t t | j      n  t
 j |  } n@ t |  r t | d |  } n t d j d t |     | j t d g  | d  } t j |  | |  d  S(   Ni   s9   shape of value must be {0}, shape of given object was {1}s"   Cannot set item of type: {dtype!s}RF   (   RT   R   t   tupleR   RS   Rm   Ru   R   RM   Rc   R,   RY   R\   RP   R   t   intt   asarrayR   R   RO   R=   t   reshapeR   t	   _set_item(   R>   R   t   valueR   t   mat(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   __setitem__X  s"    	( c   
      C   s}   d d l  m } | } | \ } } } } | |  } | |  } | |  } | |  } t | | | |  }	 |	 j |  _ d S(   s%   
        Unpickle the panel.
        i(   t   _unpickle_arrayN(   t   pandas.io.pickleR   R#   R   (
   R>   t   stateR   t	   _unpicklet   valsRB   t   majorR   Rc   t   wp(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _unpickle_panel_compatn  s    c         C   s(   |  j  |  } | j |  j |  |    S(   s  
        Conform input DataFrame to align with chosen axis pair.

        Parameters
        ----------
        frame : DataFrame
        axis : {'items', 'major', 'minor'}

            Axis the input corresponds to. E.g., if axis='major', then
            the frame's columns would be items, and the index would be
            values of the minor axis

        Returns
        -------
        DataFrame
        (   R   Ru   Rp   (   R>   t   frameRh   R!   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   conform~  s    i   c         C   s
   t   d  S(   N(   R   (   R>   t   n(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   head  s    c         C   s
   t   d  S(   N(   R   (   R>   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   tail  s    i    c         O   sZ   t  j | |  t |  rJ t j t j d |  j  } |  j | d d St d   d S(   s  
        Round each value in Panel to a specified number of decimal places.

        .. versionadded:: 0.18.0

        Parameters
        ----------
        decimals : int
            Number of decimal places to round to (default: 0).
            If decimals is negative, it specifies the number of
            positions to the left of the decimal point.

        Returns
        -------
        Panel object

        See Also
        --------
        numpy.around
        i    Rh   s   decimals must be an integerN(	   t   nvt   validate_roundR   R,   t   apply_along_axist   roundRc   t   _wrap_resultRO   (   R>   t   decimalsR   R]   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s
    c         C   s   t  S(   sE   
        Don't allow a multi reindex on Panel or above ndim.
        (   RX   (   R>   R!   t   methodt   level(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _needs_reindex_multi  s    c         K   s
   t   d  S(   N(   R   (   R>   R   R]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   align  s    t   anyc         C   s   |  j  |  } |  j } t |  } x? t t t t |  j   | h   D] } | j |  } qM Wt	 j
 | j |  | j | d  } | d k r | d k } n | | k } |  j |  | }	 |  j |	 d | }
 | r |  j |
  n |
 Sd S(   s?  
        Drop 2D from panel, holding passed axis constant.

        Parameters
        ----------
        axis : int, default 0
            Axis to hold constant. E.g. axis=1 will drop major_axis entries
            having a certain amount of NA data
        how : {'all', 'any'}, default 'any'
            'any': one or more values are NA in the DataFrame along the
            axis. For 'all' they all must be.
        inplace : bool, default False
            If True, do operation inplace and return None.

        Returns
        -------
        dropped : Panel
        i   t   alli    Rh   N(   t   _get_axis_numberRc   R   t   reversedR   t   setR   R   t   sumR,   t   prodR   R   t   reindex_axist   _update_inplace(   R>   Rh   t   howt   inplaceRc   t   maskR   t	   per_slicet   condt   new_axR   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   dropna  s    	/%c         C   s   t  | t  r |  j | |  St  | t  rD |  j | | d | St |  r` |  j | |  St d j d t	 |  d t	 |      d  S(   NRh   sA   {otype!s} is not supported in combine operation with {selftype!s}t   otypet   selftype(
   RS   R#   t   _combine_panelR   t   _combine_frameR   t   _combine_constR   RP   R=   (   R>   R   R   Rh   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _combine  s    	c         C   sG   t  j d d   | |  j |  } Wd  QX|  j   } |  j | |  S(   NR  t   ignore(   R,   t   errstateRc   R   R?   (   R>   R   R   R   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR    s    c         C   s  |  j  |  \ } } |  j |  } | j d | d |  } t j d d   | d k rs | |  j | j  } n | d k r | |  j j d d  | j j  } | j d d  } nB | d k r | |  j j d d  | j  } | j d d  } n  Wd  QX|  j | |  j	 |  j
 |  j  S(   NR   R   R  R  i    i   i   (   R   R  Ru   R,   R  Rc   t   swapaxest   TR?   RB   RC   RD   (   R>   R   R   Rh   R   R   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR    s    $!c         C   s   |  j  j | j   } |  j j | j  } |  j j | j  } |  j d | d | d |  } | j d | d | d |  } t j d d   | | j | j  } Wd  QX|  j | | | |  S(   NRB   R   R   R  R  (	   RB   t   unionRC   RD   Ru   R,   R  Rc   R?   (   R>   R   R   RB   R   R   t   thist   result_values(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR    s    c         C   s   |  j  | d |  j d S(   s  
        Return slice of panel along major axis.

        Parameters
        ----------
        key : object
            Major axis label

        Returns
        -------
        y : DataFrame
            index -> minor axis, columns -> items

        Notes
        -----
        major_xs is only for getting, not setting values.

        MultiIndex Slicers is a generic way to get/set values on any level or
        levels and is a superset of major_xs functionality, see
        :ref:`MultiIndex Slicers <advanced.mi_slicers>`
        Rh   i   (   t   xsR   (   R>   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   major_xs  s    c         C   s   |  j  | d |  j d S(   s  
        Return slice of panel along minor axis.

        Parameters
        ----------
        key : object
            Minor axis label

        Returns
        -------
        y : DataFrame
            index -> major axis, columns -> items

        Notes
        -----
        minor_xs is only for getting, not setting values.

        MultiIndex Slicers is a generic way to get/set values on any level or
        levels and is a superset of minor_xs functionality, see
        :ref:`MultiIndex Slicers <advanced.mi_slicers>`
        Rh   i   (   R#  R   (   R>   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   minor_xs1  s    i   c         C   s   |  j  |  } | d k r# |  | S|  j   |  j  |  } |  j j | d | d t } |  j |  } | j } | j |  d | | S(   s  
        Return slice of panel along selected axis.

        Parameters
        ----------
        key : object
            Label
        axis : {'items', 'major', 'minor}, default 1/'major'

        Returns
        -------
        y : ndim(self)-1

        Notes
        -----
        xs is only for getting, not setting values.

        MultiIndex Slicers is a generic way to get/set values on any level or
        levels and is a superset of xs functionality, see
        :ref:`MultiIndex Slicers <advanced.mi_slicers>`
        i    Rh   RE   (   R  R   R   R#  RX   t   _construct_return_typet   is_mixed_typet   _set_is_copy(   R>   R   Rh   t   axis_numberR   R   RE   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR#  I  s    
	c         C   s   |  j  |  } | | } t | t  o4 t | t  si t |  ri i | |  j |  6} |  j |   Sn  | d k r |  j j |  } |  j	 | |  S|  j
   |  j j | d | d t d t } |  j |  S(   sr   
        Parameters
        ----------
        i : int, slice, or sequence of integers
        axis : int
        i    Rh   RE   R   (   R   RS   R   R   R   R   Ru   R   t   igetR   R   R#  R   R&  (   R>   Ry   Rh   R   R   t   indexerRc   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _ixsm  s    

$R   c         C   s2   d d l  m } |  j |  } | |  | d | S(   s3  
        Group data on given axis, returning GroupBy object.

        Parameters
        ----------
        function : callable
            Mapping function for chosen access
        axis : {'major', 'minor', 'items'}, default 'major'

        Returns
        -------
        grouped : PanelGroupBy
        i(   t   PanelGroupByRh   (   t   pandas.core.groupbyR-  R  (   R>   R   Rh   R-  (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   groupby  s    c      	      s   j  \ }    | rB t  j  j d d  } | j    n t d d     f d    j D } d  f d  } t     f d  } t	  j
 t  r |  j
 d   \ } } }	 n |  j
  \ } } }	 t	  j t  r|  j d  d   \ }
 } } n |  j d	 t \ }
 } } | | } | |
 } |	 | } t d
 | d | d | d t  } t | d | d  j S(   s  
        Transform wide format into long (stacked) format as DataFrame whose
        columns are the Panel's items and whose index is a MultiIndex formed
        of the Panel's major and minor axes.

        Parameters
        ----------
        filter_observations : boolean, default True
            Drop (major, minor) pairs without a complete set of observations
            across all the items

        Returns
        -------
        y : DataFrame
        Rh   i    c            s*   i  |  ]  }  | j  j     |  q S(    (   Rc   t   ravel(   Rd   R   (   t   selectorR>   (    s0   lib/python2.7/site-packages/pandas/core/panel.pys
   <dictcomp>  s   	i   c            s   g  |  j  D] } t j | |  ^ q
 } g  | D]$ } | j | d  j d d  ^ q/ } g  | D] } |   ^ q` } |  j } |  j } | | | f S(   Nit   ordert   F(   t   codesR,   R/   R   R0  t   levelsR9   (   t   idxt   n_repeatt	   n_shuffleR`   R4  R5  R9   (   R1  (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   construct_multi_parts  s    (.		c            s   |  g } | r@ t  j   j     g } |  j p: d } nP t  j    j d    t  j  d t } | j    g } |  j p d } | g } | | | f S(   NR   i   RF   R   (   R,   t   arangeR/   R   R   t   zerosR   R0  (   R6  R   R5  R4  R9   (   t   Kt   NR1  (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   construct_index_parts  s    	.	R7  R8  R   R5  R4  R9   t   verify_integrityR   R   N(   R   R   Rc   R  R0  R   R:   RB   R   RS   RC   R   RD   RX   R   (   R>   t   filter_observationst   _R  RA   R9  R>  t   major_codest   major_levelst   major_namest   minor_codest   minor_levelst   minor_namesR5  R4  R9   R   (    (   R<  R=  R1  R>   s0   lib/python2.7/site-packages/pandas/core/panel.pyt   to_frame  s2    $


	c            s   r. t    t j  r.    f d   } n   } t  | t t f  rn t |  d k rn |  j | d | S|  j |  } t  | t j  r yH t j d d   t j	   | |  j
  } Wd QX|  j | d | SWq t k
 r q Xn  |  j | d | S(   s  
        Applies function along axis (or axes) of the Panel.

        Parameters
        ----------
        func : function
            Function to apply to each combination of 'other' axes
            e.g. if axis = 'items', the combination of major_axis/minor_axis
            will each be passed as a Series; if axis = ('items', 'major'),
            DataFrames of items & major axis will be passed
        axis : {'items', 'minor', 'major'}, or {0, 1, 2}, or a tuple with two
            axes
        Additional keyword arguments will be passed as keywords to the function

        Returns
        -------
        result : Panel, DataFrame, or Series

        Examples
        --------

        Returns a Panel with the square root of each element

        >>> p = pd.Panel(np.random.rand(4, 3, 2))  # doctest: +SKIP
        >>> p.apply(np.sqrt)

        Equivalent to p.sum(1), returning a DataFrame

        >>> p.apply(lambda x: x.sum(), axis=1)  # doctest: +SKIP

        Equivalent to previous:

        >>> p.apply(lambda x: x.sum(), axis='major')  # doctest: +SKIP

        Return the shapes of each DataFrame over axis 2 (i.e the shapes of
        items x major), as a Series

        >>> p.apply(lambda x: x.shape, axis=(0,1))  # doctest: +SKIP
        c            s     |    S(   N(    (   R`   (   R   R]   (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   <lambda>  s    i   Rh   R  R  N(   RS   R,   t   ufuncR   RQ   R+   t	   _apply_2dR  R  R   Rc   R   t   AttributeErrort	   _apply_1d(   R>   R   Rh   R]   t   fR   (    (   R   R]   s0   lib/python2.7/site-packages/pandas/core/panel.pyt   apply  s    )'c            s  |  j  |  } |  j } |  j } |  j |  } d g | d } t j | d  } t t |   }	 |	 j |  t	 d  d   | | <| j |	 |  g  |	 D] }
 |  j |
  ^ q } t j |  j  j |	  } t |  } g  } x t t j |   D]   t   f d   | D  } | j |	 |  t | t |  d | d | } | |  } | j |  | d c d 7<d } xP | | | | k r| d | k r| | d c d 7<d | | <| d 8} qWq Wt |  s|  j |  j     St | d t  rt j g  | D] } | j ^ q } | j j t t |  g t |    } t j | g |	  j   } | j t t |    } |  j | |  j    St j |  j |  } | j d k r| |  j k r| j } | d  d  d  } n  |  j | |  S(	   Ni    i   t   Oc         3   s   |  ] } |   Vq d  S(   N(    (   Rd   t   p(   Ry   (    s0   lib/python2.7/site-packages/pandas/core/panel.pys	   <genexpr>@  s    R   R   ii   (   R   R   Rc   R   R,   R;  RQ   R   t   removeR   R:   t   putt   arrayR   t   takeR   R  R   R   Rw   R+   R?   R   RS   t   vstackR  R   t   argsortt	   transposeR   R&  (   R>   R   Rh   R   R   Rc   t
   slice_axist   slice_indexerR+  t   indlistR   t   planesR   t   pointst   resultst   ptst   objR   R   t   rt   arrt   tranp(    (   Ry   s0   lib/python2.7/site-packages/pandas/core/panel.pyRM  (  sN    		""'
%+	c         C   s   |  j  } g  | D] } |  j |  ^ q } t t |   } x | D] } | j |  qD W| d } t d d  g | } |  j |  } g  } xV t |  D]H \ }	 }
 |	 | | <|  j	 t
 |  } | |  } | j |
 | f  q W|  j t |   S(   sL   
        Handle 2-d slices, equiv to iterating over the other axis.
        i    N(   R   R  RQ   R   RR  R   R:   R   Rn   t   ilocR   Rw   R&  RV   (   R>   R   Rh   R   R^   t   indexer_axist   slicerR   R^  Ry   t   et   slicedR`  (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRK  c  s    	"

c            s   | r t  d j |    n  | d  k rE | d k rE d    d  } n- |  j |  } |  j |  } |  j |         f d   }	 t j d d   |	 |  j  }
 Wd  QX| d  k r | d k r t j |
  S|  j	 |  } |
 j
 d k r| |  j k r|
 j }
 n  |  j |
 |  S(   Ns*   Panel.{0} does not implement numeric_only.t   boolc            s    |  d   d   S(   NRh   t   skipna(    (   R`   (   R)  t   kwdst   opRj  (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRI    s    R  R  i   (   R   RP   R:   R  R   R,   R  Rc   t   bool_R   R   R   R  R&  (   R>   Rl  R   Rh   Rj  t   numeric_onlyt   filter_typeRk  R   RN  R   R!   (    (   R)  Rk  Rl  Rj  s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _reduce}  s$    		c         C   s/  t  | d d  } | d k rq t | t  rq t  t t j |   d d d  } | d k rn | d 7} qn qq n  | d k r t |  S|  j | k r | d k r |  j	 |  S|  j	 | |  j
    S|  j | d k r| d k r |  j |  S|  j | |  j |  |   St d j d |  d |    d S(   s=   
        Return the type for the ndim of the result.
        R   i    i   s@   invalid _construct_return_type [self->{self}] [result->{result}]R>   R   N(   R   R:   RS   RV   RQ   Rj   t
   itervaluesR   R   R?   R   Rm   Rp   R\   RP   (   R>   R   R!   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR&    s&    %
c         C   sX   |  j  |  } |  j |  } | j d k rH | |  j k rH | j } n  |  j | |  S(   Ni   (   R   R   R   R   R  R&  (   R>   R   Rh   R!   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s
    c         O   s  | j  d d   } | j  d d   } | d  k	 r[ | j d  rN t d   n  | | d <n  | d  k	 r | j d  r t d   n  | | d <n  t |  | | d d  } | j |  | j  d	 d   | j  d d   t j   - t j d
 t	  t
 t |   j |   } Wd  QX| S(   NR   R   RC   s,   Cannot specify both 'major' and 'major_axis'RD   s,   Cannot specify both 'minor' and 'minor_axis't   labelsRu   Rh   R  (   RN   R:   Rq   RO   R
   t   updateRG   t   catch_warningst   simplefilterRI   R   R#   Ru   (   R>   R   R]   R   R   R!   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRu     s&    	c         K   sp   | d  k	 r | n | j d d   } | d  k	 r6 | n | j d d   } t t |   j d | d | d | |  S(   NR   R   RB   RC   RD   (   R:   RN   R   R#   t   rename(   R>   RB   RC   RD   R]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRv    s    R  c         C   s=   t  t |   j d | d | d | d | d | d | d |  S(   NRr  Rh   R  R  RE   t   limitt
   fill_value(   R   R#   R  (   R>   Rr  Rh   R  R  RE   Rw  Rx  (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR    s    c         O   s   t  |  d k rC t | d d  rC t | d  rC | d } n | } d | k rj | rj t d   n | s | j d d  } n  t t |   j | |   S(   Ni   i    t   __iter__R!   s;   transpose() got multiple values for keyword argument 'axes'(    (   R+   t   hasattrR   RO   RN   R   R#   RX  (   R>   R   R]   R!   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRX    s    %c         K   s:   t  t |   j d | d | d | d | d | d | |  S(   NR   R  Rh   R  Rw  t   downcast(   R   R#   t   fillna(   R>   R   R  Rh   R  Rw  R{  R]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR|  	  s    $c         C   sO   |  j  |  } |  j } t j |  } | j d | d d  } |  j | |  S(   s   
        Return number of observations over requested axis.

        Parameters
        ----------
        axis : {'items', 'major', 'minor'} or {0, 1, 2}

        Returns
        -------
        count : DataFrame
        Rh   RF   t   int64(   R  Rc   R,   t   isfiniteR  R   (   R>   Rh   Ry   Rc   R  R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   count  s
    	c         C   s8   | r |  j  | | d | St t |   j | d | S(   sK  
        Shift index by desired number of periods with an optional time freq.

        The shifted data will not include the dropped periods and the
        shifted axis will be smaller than the original. This is different
        from the behavior of DataFrame.shift()

        Parameters
        ----------
        periods : int
            Number of periods to move, can be positive or negative
        freq : DateOffset, timedelta, or time rule string, optional
        axis : {'items', 'major', 'minor'} or {0, 1, 2}

        Returns
        -------
        shifted : Panel
        Rh   (   t   tshiftR   R#   t   slice_shift(   R>   t   periodst   freqRh   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   shift%  s    c         C   s   t  t |   j | | |  S(   N(   R   R#   R  (   R>   R  R  Rh   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR  =  s    t   leftc      
   C   s%  d d l  m } t | t  r |  j | |  \ } } |  j d | d |  } | j d | d |  } | j j | j | |  }	 |  j |	  S| s | r t	 d   n  | d k r d } |  j
 |  j g }
 n! | d k r t	 d	   n d }
 | |  g t |  d
 d d | d |
 d t Sd S(   s4  
        Join items with other Panel either on major and minor axes column.

        Parameters
        ----------
        other : Panel or list of Panels
            Index should be similar to one of the columns in this one
        how : {'left', 'right', 'outer', 'inner'}
            How to handle indexes of the two objects. Default: 'left'
            for joining on index, None otherwise
            * left: use calling frame's index
            * right: use input frame's index
            * outer: form union of indexes
            * inner: use intersection of indexes
        lsuffix : string
            Suffix to use from left frame's overlapping columns
        rsuffix : string
            Suffix to use from right frame's overlapping columns

        Returns
        -------
        joined : Panel
        i(   t   concatR   R   s3   Suffixes not supported when passing multiple panelsR  t   outert   rights-   Right join not supported with multiple panelsRh   i    R   t	   join_axesR?  N(   t   pandas.core.reshape.concatR  RS   R#   t   _get_join_indexRu   R   t   mergeR?   R\   RC   RD   R:   RQ   R   (   R>   R   R  t   lsuffixt   rsuffixR  t
   join_majort
   join_minorR!  t   merged_dataR  (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR   @  s"    "t   old_arg_namet   raise_conflictt   new_arg_namet   errorst   mappingR  t   raisec   	      C   s   t  | |  j  s$ |  j |  } n  |  j } |  j } | j i | | 6  } x; | D]3 } |  | j | | d | d | d | d | qS Wd S(   sx  
        Modify Panel in place using non-NA values from other Panel.

        May also use object coercible to Panel. Will align on items.

        Parameters
        ----------
        other : Panel, or object coercible to Panel
            The object from which the caller will be udpated.
        join : {'left', 'right', 'outer', 'inner'}, default 'left'
            How individual DataFrames are joined.
        overwrite : bool, default True
            If True then overwrite values for common keys in the calling Panel.
        filter_func : callable(1d-array) -> 1d-array<bool>, default None
            Can choose to replace values other than NA. Return True for values
            that should be updated.
        errors : {'raise', 'ignore'}, default 'ignore'
            If 'raise', will raise an error if a DataFrame and other both.

            .. versionchanged :: 0.24.0
               Changed from `raise_conflict=False|True`
               to `errors='ignore'|'raise'`.

        See Also
        --------
        DataFrame.update : Similar method for DataFrames.
        dict.update : Similar method for dictionaries.
        R   t	   overwritet   filter_funcR  N(   RS   R?   R   R   Ru   Rs  (	   R>   R   R   R  R  R  R   t   axis_valuesR   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRs  q  s    !		 c         C   s   | d k r" |  j  |  j } } n | d k rD | j  | j } } nr | d k r} |  j  j | j   } |  j j | j  } n9 | d k r |  j  j | j   } |  j j | j  } n  | | f S(   NR  R  t   innerR  (   RC   RD   t   intersectionR   (   R>   R   R  R  R  (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR    s    c         K   s8   g  t  |  D]' \ } } |  j |  | d | | ^ q S(   s4   
        Return a list of the axis indices.
        Rh   (   Rn   Ro   (   R>   RA   R!   R]   Ry   R^   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   _extract_axes  s    c            s1     f d   t    j   j t |  |  D S(   s=   
        Return the slice dictionary for these axes.
        c            s&   i  |  ] \ } } |   j  |  q S(    (   t   _AXIS_SLICEMAP(   Rd   Ry   R^   (   R>   (    s0   lib/python2.7/site-packages/pandas/core/panel.pys
   <dictcomp>  s   	 (   R   RM   R   R+   (   R>   R!   (    (   R>   s0   lib/python2.7/site-packages/pandas/core/panel.pyRp     s    c         C   s   t  | t j  sZ t j |  } t | j j t j  ro t j	 | d t
 d t } qo n | ro | j   } n  | j |  j k r t d j |  j | j    n  | S(   NRF   RE   sc   The number of dimensions required is {0}, but the number of dimensions of the ndarray given was {1}(   RS   R,   RY   R   t
   issubclassRF   R=   Rj   R   RT  t   objectR   RE   R   R   R\   RP   (   R>   Rc   RE   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s    !	c      	      s>  t    } t | t  r$ t   } n  t   } xL t j |  D]; \ } } t | t   rn  j |  | | <q= | | | <q= W j d } d   t |  j  | | d |  D      f d   | D }	 t	 |	 d <xI t j |  D]8 \ }
 } | d k	 r| j |	   | |
 <q d | |
 <q W|   d <|   d <  S(	   s6  
        Conform set of _constructor_sliced-like objects to either
        an intersection of indices / columns or a union.

        Parameters
        ----------
        frames : dict
        intersect : boolean, default True

        Returns
        -------
        dict of aligned results & indices
        i   c         S   s   i  |  ] \ } } | |  q S(    (    (   Rd   R^   R   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pys
   <dictcomp>  s   	 R   c            s$   i  |  ] }   |  j  |  q S(    (   R  (   Rd   R^   (   t	   axes_dictR>   (    s0   lib/python2.7/site-packages/pandas/core/panel.pys
   <dictcomp>  s   	 RE   RA   RF   N(   RV   RS   R   Rj   Rk   Rm   RM   R   R  RX   R:   Ru   (   R>   t   framesR   RF   R   t
   adj_framesRe   Rf   R!   t   reindex_dictR   R   (    (   R  R>   s0   lib/python2.7/site-packages/pandas/core/panel.pyR     s(    		


c   
      C   s  d  } t |  d k r' t g   } n t |  d k rB g  } n  t } t } xX | j   D]J } t | |  j  r| t } q[ | d  k	 r[ t } | j | j	 |  q[ q[ W| r t
 | j   d | d | d d  } n  | ret t |   }	 t |	  d k rt d j d |    n  | rI|	 d t |  k rbt d   qbqet t j |	 d   } n  | d  k rt g   } n  t |  S(	   Ni    Rh   R   t   sorti   s&   ndarrays must match shape on axis {ax}R   s#   Length of data and index must match(   R:   R+   R   RX   Rc   RS   Rm   R   Rw   R   R   RQ   R
  R\   RP   t   AssertionErrorR,   R:  R   (
   R>   RA   Rh   R   R   t   raw_lengthst   have_raw_arrayst   have_framesRf   t   lengths(    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyRo     s8    		c         O   s   t  t |   j | |   d S(   s   
        NOT IMPLEMENTED: do not call this method, as sorting values is not
        supported for Panel objects and will raise an error.
        N(   R   R#   t   sort_values(   R>   R   R]   (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR  #  s    N(T   t   __name__t
   __module__t   __doc__t   propertyR?   R   Rm   R:   RX   RK   RJ   RW   Rx   t   classmethodR   R   R   RZ   R   R   R   R   t   fromDictR   R   R   R   R   R   R   R   R   R   R   R   R   R   R  R  R  R  R  R  R  R$  R%  R#  t   _xsR,  R/  R   RH  RO  RM  RK  Rp  R&  R   R   t   _shared_doc_kwargsR   R   Ru   Rv  R   R,   Rt   R  RX  R|  R  R  R  R   R	   Rs  R  t   staticmethodR  Rp   R   R   Ro   R  (    (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyR#   l   s   	))	*									
3					#					)				"L@	;		$					1	)	+*RB   RC   RD   t	   info_axisi    t	   stat_axisi   t   aliasesR   R   t   slicersR   R   t   docs(L   R  t
   __future__R    RG   t   numpyR,   t   pandas.compatRj   R   R   R   R   R   t   pandas.compat.numpyR   R   t   pandas.util._decoratorsR   R   R	   t   pandas.util._validatorsR
   t   pandas.core.dtypes.castR   R   R   t   pandas.core.dtypes.commonR   R   R   R   t   pandas.core.dtypes.missingR   t   pandas.core.commont   coret   commonRT   t   pandas.core.frameR   t   pandas.core.genericR   R   t   pandas.core.indexR   R   R   R   t   pandas.core.indexes.baset   indexest   baseR   t   pandas.core.indexingR   t   pandas.core.internalsR   R   R   t   pandas.core.opst   opst   pandas.core.reshape.utilR   t   pandas.core.seriesR   t   pandas.io.formats.printingR    RV   R  RP   R6   R:   R<   R#   t   _setup_axest   add_special_arithmetic_methodst   add_flex_arithmetic_methodst   _add_numeric_operations(    (    (    s0   lib/python2.7/site-packages/pandas/core/panel.pyt   <module>   s\   (""		,     


