ó
šxŠ\c           @   s‚  d  d l  Z d  d l Z d  d l m Z m Z m Z m Z d  d l j	 j
 Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d	 „  ƒ Z e j d
 „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z d S(   iÿÿÿÿN(   t	   DataFramet   NaTt   compatt
   date_rangec           C   s   t  t j ƒ  ƒ S(   sm   
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    (   R    t   tmt   getSeriesData(    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   float_frame   s    c          C   sK   t  t j ƒ  ƒ }  t j |  j d d +t j |  j d d … d d … f <|  S(   s†   
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D']; some entries are missing
    i   i
   i   i   iþÿÿÿN(   R    R   R   t   npt   nant   loc(   t   df(    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   float_frame_with_na   s    "c           C   s"   t  t j ƒ  d d d d d g ƒS(   sl   
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['D', 'C', 'B', 'A']
    t   columnst   Dt   Ct   Bt   A(   R    R   R   (    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   float_frame2    s    c          C   s`   t  t j ƒ  ƒ d k }  |  j t ƒ }  t j |  j d d +t j |  j d d … d d … f <|  S(   sˆ   
    Fixture for DataFrame of booleans with index of unique strings

    Columns are ['A', 'B', 'C', 'D']; some entries are missing
    i    i   i
   i   i   iþÿÿÿN(   R    R   R   t   astypet   objectR   R   R	   (   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   bool_frame_with_na*   s
    "c          C   sK   t  d „  t j t j ƒ  ƒ Dƒ ƒ }  t  d „  t j |  ƒ Dƒ d t j ƒS(   sj   
    Fixture for DataFrame of ints with index of unique strings

    Columns are ['A', 'B', 'C', 'D']
    c         S   s(   i  |  ] \ } } | j  t ƒ | “ q S(    (   R   t   int(   t   .0t   kt   v(    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pys
   <dictcomp>@   s   	c         S   s   i  |  ] \ } } | | “ q S(    (    (   R   t   ct   s(    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pys
   <dictcomp>C   s   	 t   dtype(   R    R   t	   iteritemsR   R   R   t   int64(   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt	   int_frame9   s    	c           C   s   t  t j ƒ  ƒ S(   sb   
    Fixture for DataFrame of floats with DatetimeIndex

    Columns are ['A', 'B', 'C', 'D']
    (   R    R   t   getTimeSeriesData(    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   datetime_frameF   s    c          C   s    t  t j ƒ  ƒ }  d |  d <|  S(   s€   
    Fixture for DataFrame of floats and strings with index of unique strings

    Columns are ['A', 'B', 'C', 'D', 'foo'].
    t   bart   foo(   R    R   R   (   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   float_string_frameP   s    
c          C   sj   t  t j ƒ  ƒ }  |  j j d ƒ |  _ |  j j d ƒ |  _ |  j j d ƒ |  _ |  j j d ƒ |  _ |  S(   s|   
    Fixture for DataFrame of different float types with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    t   float32t   float16t   float64(   R    R   R   R   R   R   R   R   (   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   mixed_float_frame\   s    c          C   sj   t  t j ƒ  ƒ }  |  j j d ƒ |  _ |  j j d ƒ |  _ |  j j d ƒ |  _ |  j j d ƒ |  _ |  S(   s|   
    Fixture for DataFrame of different float types with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    R$   R%   R&   (   R    R   R   R   R   R   R   (   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   mixed_float_frame2k   s    c          C   s‰   t  d „  t j t j ƒ  ƒ Dƒ ƒ }  |  j j d ƒ |  _ t j t	 |  j
 ƒ d d ƒ|  _
 |  j j d ƒ |  _ |  j j d ƒ |  _ |  S(   sz   
    Fixture for DataFrame of different int types with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    c         S   s(   i  |  ] \ } } | j  t ƒ | “ q S(    (   R   R   (   R   R   R   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pys
   <dictcomp>   s   	t   int32R   t   uint64t   uint8R   (   R    R   R   R   R   R   R   R   t   onest   lenR   R   R   (   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   mixed_int_framez   s    	!c           C   sh   t  i d d 6d d 6d d 6t j d g d d d	 ƒd	 6t j d
 g d d d ƒd 6d t j d ƒ ƒS(   s   
    Fixture for DataFrame of float/int/string columns with RangeIndex

    Columns are ['a', 'b', 'c', 'float32', 'int32'].
    g      ð?t   ai   t   bR"   R   i
   R   R$   i   R)   t   index(   R    R   t   arrayt   arange(    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   mixed_type_frameŠ   s     c          C   so   t  i t d d d ƒd 6t d d d d d ƒd 6t d d d d d ƒd	 6ƒ }  t |  j d <t |  j d <|  S(   s‰   
    Fixture for DataFrame of date_range Series with different time zones

    Columns are ['A', 'B', 'C']; some entries are missing
    t   20130101t   periodsi   R   t   tzs
   US/EasternR   t   CETR   i   i   (   i   i   (   i   i   (   R    R   R   t   iloc(   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   timezone_frame—   s    
c           C   s
   t  i  ƒ S(   s%   
    Fixture for empty DataFrame
    (   R    (    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   empty_frame¨   s    c           C   s   t  j d d ƒ S(   s9   
    Fixture for Series of floats with DatetimeIndex
    t   nperi   (   R   t   makeTimeSeries(    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   datetime_series°   s    c           C   s   t  j d d ƒ d S(   s9   
    Fixture for Series of floats with DatetimeIndex
    R<   i   i   (   R   R=   (    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   datetime_series_short¸   s    c          C   s[   t  j d d d g d d d g d d d	 g g ƒ }  t |  d
 d d d g d d d d g ƒS(   sn   
    Fixture for simple 3x3 DataFrame

    Columns are ['one', 'two', 'three'], index is ['a', 'b', 'c'].
    g      ð?g       @g      @g      @g      @g      @g      @g       @g      "@R   t   onet   twot   threeR1   R/   R0   R   (   R   R2   R    (   t   arr(    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   simple_frameÀ   s
    c          C   s‹   t  i d d d d d g d 6d d d d d g d 6d d	 d
 d d g d 6t j j d ƒ d 6t j j d ƒ d 6t j j d ƒ d 6ƒ }  |  S(   sÞ   
    Fixture for DataFrame of columns that can be used for indexing

    Columns are ['A', 'B', 'C', 'D', 'E', ('tuple', 'as', 'label')];
    'A' & 'B' contain duplicates (but are jointly unique), the rest are unique.
    R"   R!   R   R@   RA   RB   R   R/   R0   R   t   dt   eR   i   R   t   Et   tuplet   ast   label(   RH   RI   RJ   (   R    R   t   randomt   randn(   R
   (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   frame_of_index_colsÏ   s    (   t   numpyR   t   pytestt   pandasR    R   R   R   t   pandas.util.testingt   utilt   testingR   t   fixtureR   R   R   R   R   R    R#   R'   R(   R.   R4   R:   R;   R>   R?   RD   RM   (    (    (    s:   lib/python2.7/site-packages/pandas/tests/frame/conftest.pyt   <module>   s(   "


