
    Pi                     6   d dl Z d dlmZmZmZ d dlmZ d dlmZ d dlm	Z	 d dl
Z
d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmc mZ d dlZd dlmZmZmZmZmZmZ d dlm Z! d dl"m#Z#m$Z$m%Z%m&Z&m'Z' d d	l(m)Z) d
e*de*fdZ+ej,        d             Z- ej,        g d          d             Z.ej,        d             Z/ej,        d             Z0ej1        2                    d ej3        d ej4        d           ej4        d          g           ej3        d ej4        d           ej4        d          g           ej3        d ej4        d           ej4        d          g           ej3        d ej4        d                    g           G d d                      Z5ej1        2                    d ej3        dd ej4        d           ej4        d          g           ej3        dd ej4        d           ej4        d          g           ej3        dd ej4        d           ej4        d          g           ej3        dd ej4        d                    g          ej1        6                    d           G d  d!                                  Z7 G d" d#          Z8 ej4        d           ej4        d           G d$ d%                                  Z9ej1        2                    d& e)j:                              d'             Z;dS )(    N)datedatetime	timedelta)Decimal)partial)BytesIO)import_optional_dependency)	DataFrameIndex
MultiIndex
date_rangeoption_contextperiod_range)	ExcelFileExcelWriter_OpenpyxlWriter_XlsxWriterregister_writer)_writerspathreturnc                     dS )Nus )r   s    v/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/pandas/tests/io/excel/test_writers.pyget_exp_unitr   *   s    4    c                     | dd         S )z?
    Returns the first ten items in fixture "float_frame".
    N
   r   )float_frames    r   framer!   .   s    
 ssr   TFcolumns)paramsc                     | j         S N)param)requests    r   merge_cellsr)   6   s
    =r   c                 |    |t          j                     |  z  }|                                 t          |          S )z9
    Fixture to open file for use in each test case.
    )uuiduuid4touchstr)exttmp_pathtmps      r   	tmp_excelr2   ;   s7    
 
+c++
+CIIKKKs88Or   c              #      K   d|                     d           d}t          ||           5  dV  ddd           dS # 1 swxY w Y   dS )aM  
    Fixture to set engine for use in each test case.

    Rather than requiring `engine=...` to be provided explicitly as an
    argument in each test, this fixture sets a global option to dictate
    which engine should be used to write Excel files. After executing
    the test it rolls back said change to the global option.
    z	io.excel..z.writerN)stripr   )enginer/   option_names      r   
set_enginer8   E   s       6ciinn555K	V	,	,                   s   >AAr/   .xlsxopenpyxlxlrdmarksz.xlsm
xlsxwriterz.odsodfc                   h   e Zd Zej                            ddej        gdz  fddej        gdz  ifg          d             Zej                            dddgfdg fg          d	             Z	d
 Z
d Zd Zej                            dddg          ej                            dddg          ej                            dddg          ej                            dddg          d                                                 Zd Zd Zej                            dg d          d             ZdS )TestRoundTripzheader,expectedN   r   z
Unnamed: 0   c                     d}t          g dg dg dg dg          }|                    ||dd           t          j        ||dg|	          }t          |          }t	          j        ||           d S )
N	no_header    d   rG         rG   rC   i,  rG   rB   i  F
sheet_nameindexheaderr   rP   usecolsrR   r
   to_excelpd
read_exceltmassert_frame_equal)selfr2   rR   expectedfilenamedfresults          r   !test_read_one_empty_col_no_headerz/TestRoundTrip.test_read_one_empty_col_no_header`   s     lllLLL,,,OPP
I(%NNN(QC
 
 
 X&&
fh/////r   zheader,expected_extrac                    d}t          g dg dg dg dg          }|                    |ddd           t          j        ||d	g|
          }t          |t          j        gdz  z             }t          j        ||           d S )Nwith_headerrF   rJ   rM   rN   FTrO   r   rS   rB   )r
   rV   rW   rX   npnanrY   rZ   )r[   r2   rR   expected_extrar]   r^   r_   r\   s           r   #test_read_one_empty_col_with_headerz1TestRoundTrip.test_read_one_empty_col_with_headerp   s    
 !lllLLL,,,OPP
I-uTRRR(QC
 
 
 ^rvhl:;;
fh/////r   c                 
   t          ddgddgddggddg	          }t          |          5 }|                    |d
dd           |                    |dd           d d d            n# 1 swxY w Y   ddg|_        t	          |          5 }t          j        |d
d ddg          }t          j        |dd ddg          }d d d            n# 1 swxY w Y   t          j        ||           t          j        ||           d S )NrH   foorK   barrC   bazabr#   Data_no_headF)rP   rR   rQ   Data_with_headrP   rQ   AB)rP   rR   names)rP   	index_colrs   )	r
   r   rV   r#   r   rW   rX   rY   rZ   )r[   r2   refdfwriterreaderxlsdf_no_headxlsdf_with_heads          r   "test_set_column_names_in_parameterz0TestRoundTrip.test_set_column_names_in_parameter   s    Au:5zAu:>c
SSS## 	MvNN6nURWNXXXNN6.>eNLLL	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M c
y!! 		VM>$sCj  M !m+Cj	  O			 		 		 		 		 		 		 		 		 		 		 		 		 		 		 	mU333
ou55555s#   2A**A.1A.5CCCc                   	 d 	g d}	fd|D             }t          t          ||                    }t          |          5 }|                                D ]\  }}|                    ||           	 d d d            n# 1 swxY w Y   t          j        ||d          }|D ]#}t          j        ||         ||                    $d S )Nc                 8    g dg d}}t          ||| g          S )N)      !   rH   rK   rC   rm   )r
   )col_sheet_namedis      r   tdfzDTestRoundTrip.test_creating_and_reading_multiple_sheets.<locals>.tdf   s+    <<qAQN+;<<<<r   )AAABBBCCCc                 &    g | ]} |          S r   r   ).0sr   s     r   
<listcomp>zKTestRoundTrip.test_creating_and_reading_multiple_sheets.<locals>.<listcomp>   s!    &&&!ss1vv&&&r   rP   r   rP   rt   )	dictzipr   itemsrV   rW   rX   rY   rZ   )
r[   r2   sheetsdfsew	sheetnamer^   dfs_returnedr   r   s
            @r   )test_creating_and_reading_multiple_sheetsz7TestRoundTrip.test_creating_and_reading_multiple_sheets   s7   
	= 	= 	= '&&&&&&v&&&3vs##$$## 	6r!$ 6 6	2B955556	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 }Y6QOOO 	; 	;A!#a&,q/::::	; 	;s   2BB	Bc                    t          ddiddiddiddid          }t          ddiddiddiddid          }|                    |           t          j        |ddgd          }t	          j        ||           t          ddiddiddiddid          }t          ddiddiddiddid	          }|                    |           t          j        |ddgd          }t	          j        ||           d S )
Nr   rH   rC      )OnexTwoXr   Y)ZerorG   )r   r   r   )r   zUnnamed: 4_level_1rR   rt   ))BegrG   Middler   Tailr   r   r   ))r   zUnnamed: 1_level_1r   r   r   rU   )r[   r2   r^   r\   actuals        r   &test_read_excel_multiindex_empty_levelz4TestRoundTrip.test_read_excel_multiindex_empty_level   sb    !f !f !f !f	 
 
  !f !f !f12A	 
 
 	Iy!Q1EEE
fh///V"#Q !1v !1v	 
 
 011v"#Q !1v !1v	 
 
 	Iy!Q1EEE
fh/////r   c_idx_namesrk   r_idx_namesrl   c_idx_levelsrH   r_idx_levelsc           	      P   t                    p|dk    }|dk    rt          t          d                    }nFt          j        d t          |          D             fdt          |          D                       }|dk    rt          t          d                    }nFt          j        d t          |          D             fdt          |          D                       }t          d	t          j        d
          z  ||          }	|		                    |           t          j        |t          t          |                    t          t          |                              }
t          j        |	|
|           t          j        |	j        dd d f<   |		                    |           t          j        |t          t          |                    t          t          |                              }
t          j        |	|
|           t          j        |	j        dd d f<   |		                    |           t          j        |t          t          |                    t          t          |                              }
t          j        |	|
|           d S )NrH   abcdec                 ,    g | ]}t          d           S    ranger   _s     r   r   z@TestRoundTrip.test_excel_multindex_roundtrip.<locals>.<listcomp>       777aq777r   c                     g | ]	} d | 
S -r   )r   r   r   s     r   r   z@TestRoundTrip.test_excel_multindex_roundtrip.<locals>.<listcomp>   '    III+++++IIIr   rs   ghijkc                 ,    g | ]}t          d           S r   r   r   s     r   r   z@TestRoundTrip.test_excel_multindex_roundtrip.<locals>.<listcomp>   r   r   c                     g | ]	} d | 
S r   r   )r   r   r   s     r   r   z@TestRoundTrip.test_excel_multindex_roundtrip.<locals>.<listcomp>   r   r   皙?)r   r   r#   rQ   )rt   rR   )check_namesr   )boolr   listr   from_arraysr   r
   rc   onesrV   rW   rX   rY   rZ   rd   iloc)r[   r2   r   r   r   r   r   r#   rQ   r^   acts     ``       r   test_excel_multindex_roundtripz,TestRoundTrip.test_excel_multindex_roundtrip   s    ;''<<1+<1DMM**GG ,775#6#6777IIIIU<5H5HIII  G 1$w--((EE*775#6#6777IIIIU<5H5HIII  E "'&//!
 
 

 	Im5..//l++,,
 
 

 	b#;????111
Im5..//l++,,
 
 

 	b#;????AAA
Im5..//l++,,
 
 

 	b#;??????r   c                 |   t          g dt          dd          d          }|                                }|d         j                            d          |d<   |                    |           t          j        |d	          }t          j	        ||           t          j        |dgd
          }|d d          }|d         
                    d          |d<   t          j	        ||           t          j        |dgdd          }|d         
                    d          |d<   t          j	        ||           d S )Nr   z
2012-01-01rC   )periods)coldate_stringsr   z%m/%d/%Yr   rt   )parse_datesrt   zM8[us])r   date_formatrt   )r
   r   copydtstrftimerV   rW   rX   rY   rZ   astype)r[   r2   r^   df2resr\   s         r   test_read_excel_parse_datesz)TestRoundTrip.test_read_excel_parse_dates  sG   IIz,PQ/R/R/RSS
 
 ggii!.14==jIINYmI333
c3'''mIN3CqQQQaaa5#+N#;#B#B8#L#L 
c8,,,mN#3WX
 
 
 $,N#;#B#B8#L#L 
h,,,,,r   c                    t          j        t          d          t          j        t          j        d          dd          g          }t          t          d          |          }|                    |           t          j        |ddg          }t          t          d          t          j        t          d          g d	g          t          dg          
          }t          j        ||           d S )NrB   z
2020-01-016ME)startr   freqrQ   r   rH   r   )z*(2020-01-31 00:00:00, 2020-07-31 00:00:00]z*(2020-07-31 00:00:00, 2021-01-31 00:00:00]z*(2021-01-31 00:00:00, 2021-07-31 00:00:00]z*(2021-07-31 00:00:00, 2022-01-31 00:00:00]rm   )r   r   r   rW   interval_range	Timestampr
   rV   rX   r   rY   rZ   )r[   r2   midxr^   r_   r\   s         r   "test_multiindex_interval_datetimesz0TestRoundTrip.test_multiindex_interval_datetimes5  s    %a!,|44ae  
 
 uQxxt,,,
IyQF;;;!HH"!HH  
 
 1#JJ
 
 
 	fh/////r   r)   r"   c           
         t          dddgit          j        t          ddd          dd	ggd
dg                    }|                    ||           t          j        |ddg          }t          dddgit          j        t          j        d                              d          t          j        d                              d          gdd	ggd
dg                    }d}|j	        
                    |j	        j        d                             |          d          |_	        t          j        ||           d S )Nrq   rH   rK   z
2006-10-06z
2006-10-07D)r   endr   r   r   r   categoryr   r   r)   r   r   z2006-10-06 00:00:00r   z2006-10-07 00:00:00zdatetime64[us]level)r
   r   r   r   rV   rW   rX   to_datetimeas_unitrQ   
set_levelslevelsr   rY   rZ   )r[   r2   r)   r^   r_   r\   time_formats          r   &test_excel_round_trip_with_periodindexz4TestRoundTrip.test_excel_round_trip_with_periodindexS  ss    1a&M( |CPPP#J z*  	
 	
 	
 	I;777yQF;;;1a&M" '<==EEcJJ'<==EEcJJ #J z*	 	 	
 
 '!22N!!$++K88 3 
 
 	fh/////r   )__name__
__module____qualname__pytestmarkparametrizerc   rd   r`   rf   rz   r   r   r   r   r   r   r   r   r   rA   rA   T   s        [
1	L26(Q,#?@A 
0 
0	 
0 [
q"g 	0 	0	 	06 6 62; ; ;.,0 ,0 ,0\ []S$K88[]S$K88[^aV44[^aV44:@ :@ 54 54 98 98:@x- - -00 0 0< [],D,D,DEE 0  0 FE 0  0  0r   rA   z
engine,extr8   c                      e Zd Zd Zd Zd Zd Zd Zd Zd Z	e
j                            dej        ej        ej        ej        g          d	             Ze
j                            dej        ej        ej        g          d
             Zd Zd Zd Zd Zd Zd Zd Zd Ze
j                            d          d             Z d Z!d Z"d Z#d Z$d Z%d Z&d Z'd Z(d Z)d Z*d Z+d  Z,d! Z-d" Z.e
j                            d#d$d%g          e
j                            d&g d'          e
j                            d(g d'          d)                                     Z/d* Z0d+ Z1d, Z2e
j                            d-d.d/g          d0             Z3d1 Z4d2 Z5d3 Z6d4 Z7d5 Z8d6 Z9d7 Z:d8 Z;d9 Z<d: Z=d; Z>d< Z?d= Z@e
j                            d>d?eAg          d@             ZBdA ZCdB ZDdC ZEdD ZFdE ZGe
j                            dFd$d%g          dG             ZHdH ZIe
j                            dId$d%g          dJ             ZJe
j                            dId$d%g          dK             ZKd?S )LTestExcelWriterc                    d}d}t          j        |df          }t          j        d|f          }t          |          }t          |          }d}t          j        t
          |          5  |                    |           d d d            n# 1 swxY w Y   t          j        t
          |          5  |                    |           d d d            d S # 1 swxY w Y   d S )Ni  i@  rH   )shapezsheet is too largematch)rc   zerosr
   r   raises
ValueErrorrV   )	r[   r2   breaking_row_countbreaking_col_countrow_arrcol_arrrow_dfcol_dfmsgs	            r   test_excel_sheet_sizez%TestExcelWriter.test_excel_sheet_size  sf   &&("4a!8999(!%7!89997##7##"]:S111 	' 	'OOI&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' ]:S111 	' 	'OOI&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's$   .BBB6CC Cc           
      <   t          t          j                            d                              d          t          t          t          d                                        }|                    |           t          |          5 }t          j        |dd          }d d d            n# 1 swxY w Y   t          j        ||           d}t          j        t           |          5  t          j        |d	           d d d            d S # 1 swxY w Y   d S )
NrK   r   rK   r   r   r   r   zWorksheet named '0' not foundr   0)r
   rc   randomdefault_rngstandard_normalr   r   r   rV   r   rW   rX   rY   rZ   r   r   r   )r[   r2   gtxlr^   r  s         r   test_excel_sheet_by_name_raisez.TestExcelWriter.test_excel_sheet_by_name_raise  s}   I!!!$$44W==U2YY((
 
 
 	Iy!! 	>Rra1===B	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	b"%%%-]:S111 	# 	#M"c"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s$   B11B58B5.DDDc                    t          |          5 }|                    |d           |                                }|j        d d d         |_        |                    |d           d d d            n# 1 swxY w Y   t	          |          5 }t          j        |dd          }t          j        |dd          }t          j        ||           t          j        ||           d d d            d S # 1 swxY w Y   d S )NData1r   r   Data2r   r   )	r   rV   r   r#   r   rW   rX   rY   rZ   )r[   r!   r2   rv   frame2rw   found_df	found_df2s           r   !test_excel_writer_context_managerz1TestExcelWriter.test_excel_writer_context_manager  sr   ## 	8vNN6gN666ZZ\\F"]44R40FNOOFwO777		8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 y!! 	5V}V1MMMHfANNNI!(E222!)V444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5s%   AA44A8;A8AC44C8;C8c                    |                                 }t          j        |j        d d|j                            d          f<   |                    |d           |                    |dddg           |                    |dd           |                    |dd	           |                    |d           t          j        |dd
          }t          j
        ||           |                    |dd	           t          j        |dd           }|j        |_        t          j
        ||           |                    |dd           t          j        |dd
dg          }t          j
        ||           |                    |dd           t          j        |dd
dg          }t          j
        ||           |                    |dd           t          j        |dd
ddg          }t          j
        ||           |                    |d           t          j        |d
          }t          j
        ||           |                    |d           t          j        |d
          }t          j
        ||           |d         }|                    |           t          j        |d
          }t          j
        |                                |           d S )Nr   rq   test1r   rr   rP   r#   FrP   rR   rp   r   r   NA)rP   na_rep)rP   rt   	na_values88X   g      V@Sheet1r   r	  )r   rc   rd   r   r#   get_locrV   rW   rX   rY   rZ   rQ   to_frame)r[   r!   r2   reconsr   s        r   test_roundtripzTestExcelWriter.test_roundtrip  s   

57V
2A2u},,S1112yW555yWsCjIIIyWUCCCyWEBBB 	yW555yWJJJ
eV,,,yWEBBByWMMM{
eV,,,yWTBBB'Q4&
 
 
 	eV,,, 	yWTBBB'Q4&
 
 
 	eV,,,yWTBBB'Q2t*
 
 
 	eV,,, 	yX666yA666
eV,,,yS111yA666
eV,,, #J	

9yA666
ajjllF33333r   c                    |                                 }d|d<   |                    |d           t          |          5 }t          j        |dd          }d d d            n# 1 swxY w Y   t          j        ||           d S )Nri   rh   r  r   r   r   )r   rV   r   rW   rX   rY   rZ   )r[   r!   r2   mixed_framerw   r#  s         r   
test_mixedzTestExcelWriter.test_mixed  s    jjll"EY7;;;y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L
k622222s    A$$A(+A(c           	         t          |          }t          t          j                            d                              d          t          t          d                    t          ddd                    }t          j
        t          j        |j                  d 	          }||_        |d d          }|j                            |          |_        |                    |d
           t          |          5 }t          j        |d
d          }d d d            n# 1 swxY w Y   t#          j        ||           d S )NrK   r   rB   ABCD
2000-01-01r   rr   r   r   r   r   r  r   r   r   )r   r
   rc   r
  r  r  r   r   r   rW   DatetimeIndexasarrayrQ   r   rV   r   rX   rY   rZ   )r[   r2   unitr^   rQ   r\   rw   r#  s           r   test_ts_framezTestExcelWriter.test_ts_frame  sj   I&&I!!!$$44V<<$v,,''\13???
 
 
  BH!5!5DAAAaaa5!//55
I'222y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L
h/////s   ?D##D'*D'c                 P   |                                 }t          j        |j        d d|j                            d          f<   |                    |d           |                    |dddg           |                    |dd           |                    |dd	           d S )
Nr   rq   r  r   rr   r  Fr  rp   )r   rc   rd   r   r#   r!  rV   )r[   r!   r2   s      r   test_basics_with_nanz$TestExcelWriter.test_basics_with_nan  s    

57V
2A2u},,S1112yW555yWsCjIIIyWUCCCyWEBBBBBr   np_typec                 H   t          t          j                            d                              ddd          |t          t          t          d                                        }|                    |d           t          |          5 }t          j        |dd	
          }d d d            n# 1 swxY w Y   |                    t          j                  }t          j        ||           t          j        |dd	
          }t          j        ||           d S )NrK   r   r  sizedtyperQ   r  r   r   r   )r
   rc   r
  r  integersr   r   r   rV   r   rW   rX   r   int64rY   rZ   )r[   r4  r2   r^   rw   r#  	int_framerecons2s           r   test_int_typeszTestExcelWriter.test_int_types  sO    I!!!$$--c2G-DDU2YY((
 
 

 	I'222y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L IIbh''	
i000-	gKKK
i11111s   B77B;>B;c                    t          t          j                            d                              d          |t	          t          t          d                                        }|                    |d           t          |          5 }t          j
        |dd                              |          }d d d            n# 1 swxY w Y   t          j        ||           d S )NrK   r   r9  r  r   r   r   )r
   rc   r
  r  r   r   r   rV   r   rW   rX   r   rY   rZ   )r[   r4  r2   r^   rw   r#  s         r   test_float_typesz TestExcelWriter.test_float_types+  s    I!!!$$++B//U2YY((
 
 

 	I'222y!! 	V]6gKKKRR F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	
 	b&)))))s   +CCCc                    t          g dt          j        t          t	          t          d                                        }|                    |d           t          |          5 }t          j	        |dd          
                    t          j                  }d d d            n# 1 swxY w Y   t          j        ||           d S )N)rH   r   TFrB   r9  r  r   r   r   )r
   rc   bool_r   r   r   rV   r   rW   rX   r   rY   rZ   r[   r2   r^   rw   r#  s        r   test_bool_typeszTestExcelWriter.test_bool_types<  s    ***"(%USTXXBWBWXXX
I'222y!! 	V]6gKKKRR F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	
 	b&)))))s   ,5B--B14B1c           
         t          dt          j        fddt          j         fgt          t	          t          d                                        }|                    |d           t          |          5 }t          j	        |dd	          }d d d            n# 1 swxY w Y   t          j        ||           d S )
NrH   )rK   rC   r   rC   r   r  r   r   r   )r
   rc   infr   r   r   rV   r   rW   rX   rY   rZ   rD  s        r   test_inf_roundtripz"TestExcelWriter.test_inf_roundtripH  s    BFVa"&\:%USTXXBWBWXXX
I'222y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	b&)))))s   ;BB#&B#c           	      (   t          |          }t          t          j                            d                              d          t          t          d                    t          ddd                    }t          j
        t          j        |j                  d 	          }||_        |d d          }|j                            |          |_        |                                }t          j        |j        d d|j                            d
          f<   |                    |d           |                    |dd
dg           |                    |dd           |                    |dd           t)          |          5 }|                    |d           |                    |d           d d d            n# 1 swxY w Y   t+          |          5 }t          j        |dd          }	t/          j        ||	           t          j        |dd          }	d d d            n# 1 swxY w Y   t/          j        ||	           dt3          |j                  k    sJ d|j        d         k    sJ d|j        d         k    sJ d S )NrK   r)  r*  r+  r   rr   r,  r   r-  rq   r  r   r  Fr  rp   test2r   r   rH   )r   r
   rc   r
  r  r  r   r   r   rW   r.  r/  rQ   r   r   rd   r   r#   r!  rV   r   r   rX   rY   rZ   lensheet_names)
r[   r!   r2   r0  tsframerQ   r\   rv   rw   r#  s
             r   test_sheetszTestExcelWriter.test_sheetsQ  s   I&&I!!!$$44V<<$v,,''\13???
 
 
  GM!:!:FFF111:!//55

57V
2A2u},,S1112yW555yWsCjIIIyWUCCCyWEBBB ## 	9vNN6gN666V888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 y!! 	LV]6gKKKF!%000]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	h///C*++++++&,Q/////&,Q///////s%   /GGG"AH22H69H6c                 ~   |                                 }t          j        |j        d d|j                            d          f<   |                    |d           |                    |dddg           |                    |dd           |                    |dd	           t          g d
          }|                    |d|           t          |          5 }t          j
        |dd          }d d d            n# 1 swxY w Y   |                                 }||_        t          j        ||           d S )Nr   rq   r  r   rr   r  Fr  rp   )AAr   r   Zr   r   )r   rc   rd   r   r#   r!  rV   r   r   rW   rX   rY   rZ   )r[   r!   r2   col_aliasesrw   rsxps          r   test_colaliaseszTestExcelWriter.test_colaliasesu  sy   

57V
2A2u},,S1112yW555yWsCjIIIyWUCCCyWEBBB 11122yW[IIIy!! 	HVv'QGGGB	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	HZZ\\ 

b"%%%%%s   DD	Dc           
      B   |                                 }t          j        |j        d d|j                            d          f<   |                    |d           |                    |dddg           |                    |dd           |                    |dd	           t          t          j        	                    d
          
                    d                    dk    }|                    |ddg|           t          |          5 }t          j        |dd                              t          j                  }d d d            n# 1 swxY w Y   dg|j        _        |j        j        |j        j        k    sJ t          t          j        	                    d
          
                    d                    dk    }|                    |dg d|           t          |          5 }t          j        |dd                              t          j                  }d d d            n# 1 swxY w Y   dg|j        _        |j        j        |j        j        k    sJ t          t          j        	                    d
          
                    d          t%          t'          t)          d                                        dk    }|                    |dd|           t          |          5 }t          j        |dd                              t          j                  }d d d            n# 1 swxY w Y   dg|j        _        t+          j        ||                    t.                               |                    |dg dd|           |                                 }|                    ddg          }t          |          5 }t          j        |dddg          }d d d            n# 1 swxY w Y   t+          j        ||           d S )Nr   rq   r  r   rr   r  Fr  rp   rK   r  r   test)rP   index_labelr)   r   )rW  dummydummy2r   r   )rq   rr   Cr   )rP   r#   rQ   r)   rH   )r   rc   rd   r   r#   r!  rV   r
   r
  r  r  r   rW   rX   r   r<  rQ   rs   r   r   r   rY   rZ   r   	set_index)r[   r)   r!   r2   r^   rw   r#  s          r   test_roundtrip_indexlabelsz*TestExcelWriter.test_roundtrip_indexlabels  s   

57V
2A2u},,S1112yW555yWsCjIIIyWUCCCyWEBBB ry,,Q//??HHIIQN
'x[ 	 	
 	
 	
 y!! 	V]6gKKKRR F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 !x~!33333ry,,Q//??HHIIQN
333#	 	 	
 	
 	
 y!! 	V]6gKKKRR F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 !x~!33333 	%%a((88AADrOO,,   	 	 	'v; 	 	
 	
 	
 y!! 	V]6gKKKRR F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 !
b&--"5"5666(((# 	 	
 	
 	
 ZZ\\\\3*%%y!! 	QV]6g!QPPPF	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q
b&)))))sH   5EEE45H55H9<H9=5L>>MMO??PPc                    t          t          j                            d                              d                    }d|j        _        |                    ||           t          |          5 }t          j
        ||j        d         d          }d d d            n# 1 swxY w Y   t          j        ||           |j        j        dk    sJ d S )NrK   )r   rB   rh   r   r   r   )r
   rc   r
  r  r  rQ   namerV   r   rW   rX   rL  rY   rZ   )r[   r)   r2   r^   xfr_   s         r   test_excel_roundtrip_indexnamez.TestExcelWriter.test_excel_roundtrip_indexname  s
   ry,,Q//??HHII
I;777y!! 	RR]2".2CqQQQF	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	R 	fb)))| E))))))s   2#B!!B%(B%c           	         t          |          }t          t          j                            d                              d          t          t          d                    t          ddd                    }t          j
        t          j        |j                  d 	          }||_        |                                }d
 |j        D             |_        |                    |d|           t          |          5 }t          j        |dd          }d d d            n# 1 swxY w Y   |d d          }	|	j                            |          |	_        t%          j        |	|           d S )NrK   r)  r*  r+  r   rr   r,  r   r-  c                 6    g | ]}|                                 S r   )r   )r   r   s     r   r   zATestExcelWriter.test_excel_roundtrip_datetime.<locals>.<listcomp>  s     555!QVVXX555r   r  rP   r)   r   r   )r   r
   rc   r
  r  r  r   r   r   rW   r.  r/  rQ   r   rV   r   rX   r   rY   rZ   )
r[   r)   r2   r0  rM  rQ   tsfrw   r#  r\   s
             r   test_excel_roundtrip_datetimez-TestExcelWriter.test_excel_roundtrip_datetime  s   I&& I!!!$$44V<<$v,,''\13???
 
 

  GM!:!:FFFllnn55w}555	Y7LLLy!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 111:!//55
h/////s   D%%D),D)c                    t          |          }t          t          ddd          t          ddd          gt          ddd	d
dd          t          dddddd          ggddgddg          }t          t          ddd          t          ddd          gt          ddd	d
dd          t          dddddd          ggddgddg          }|                    d| d          }|d| z  }|                                 t          |          5 }|                    |d           d d d            n# 1 swxY w Y   t          |dd          5 }	|                    |	d           d d d            n# 1 swxY w Y   t          |          5 }
t          j
        |
dd          }d d d            n# 1 swxY w Y   t          |          5 }t          j
        |dd          }d d d            n# 1 swxY w Y   |                    d| d          }t          j        ||           t          j        ||           d S )Ni  rH      i  	      i  r         r   rB   rK         DATEDATETIMEr   r   rQ   r#   M8[]tmp2r  r   z
DD.MM.YYYYzDD.MM.YYYY HH-MM-SS)r   datetime_formatr   r   )r   r
   r   r   r   r-   r   rV   r   rW   rX   rY   rZ   )r[   r/   r2   r0   r0  r^   df_expected	filename2writer1writer2reader1rs1reader2rs2s                 r   test_excel_date_datetime_formatz/TestExcelWriter.test_excel_date_datetime_format  s    I&&dAr""Dq"$5$56$2r2q118D!RQPR3S3ST :&#J
 
 
  $2&&q"(=(=>$2r2q118D!RQPR3S3ST :&#J
 
 
 "((t77|c||+	## 	5wKKGK444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 $1
 
 
 	5 KKGK444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 y!! 	JW-GqIIIC	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J y!! 	JW-GqIIIC	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J 	J jjt''
c3''' 	c;/////sH   D44D8;D8E55E9<E9F33F7:F7G11G58G5z7ignore:invalid value encountered in cast:RuntimeWarningc                 N   t          t          j                            d                              ddd          t          j                  }|                                }t          j        |d         d          |d<   t          j        |d         d          	                    |st          nd	          |d<   |                    |d
           t          |          5 }t          j        |d
d          }d d d            n# 1 swxY w Y   t          j        ||           d S )NrK   r6  r      rH   r7  r:  r   newr.   r  r   r   )r
   rc   r
  r  r;  r<  r   rW   cutr   r.   rV   r   rX   rY   rZ   )r[   r2   using_infer_stringr^   r\   rw   r#  s          r    test_to_excel_interval_no_labelsz0TestExcelWriter.test_to_excel_interval_no_labels!  sX    I!!!$$--c2G-DDBH
 
 
 7799F2a5"%%5	&!b1188)4CCu
 
 	I'222y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L
h/////s   !DD	D	c                 .   t          t          j                            d                              ddd          t          j                  }|                                }t          j        |d         dg d	          }||d
<   t          j	        t          |                    |d
<   |                    |d           t          |          5 }t          j        |dd          }d d d            n# 1 swxY w Y   t          j        ||           d S )NrK   r6  r   r  r7  r  r   )
rq   rr   r[  r   EFGHIJ)labelsr  r  r   r   )r
   rc   r
  r  r;  r<  r   rW   r  Seriesr   rV   r   rX   rY   rZ   )r[   r2   r^   r\   	intervalsrw   r#  s          r   test_to_excel_interval_labelsz-TestExcelWriter.test_to_excel_interval_labels7  sT    I!!!$$--c2G-DDBH
 
 
 7799FqE2PPP
 
 
	 5	)DOO44
I'222y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L
h/////s   C55C9<C9c                    t          t          j                            d                              ddd          dgt          j                  }|                                }|d                             d           |d	<   |d                             d
           |d	<   |                    |d           t          |          5 }t          j        |dd          }d d d            n# 1 swxY w Y   t          j        ||           d S )NrK   r6  r   r  r7  rq   r#   r:  c                 "    t          |           S )Nseconds)r   r   s    r   <lambda>z9TestExcelWriter.test_to_excel_timedelta.<locals>.<lambda>U  s    Ia,@,@,@ r   r  c                 L    t          |                                           dz  S )Nr  iQ )r   total_secondsr  s    r   r  z9TestExcelWriter.test_to_excel_timedelta.<locals>.<lambda>W  s"    i***88::UB r   r  r   r   r   )r
   rc   r
  r  r;  r<  r   applyrV   r   rW   rX   rY   rZ   )r[   r2   r^   r\   rw   r#  s         r   test_to_excel_timedeltaz'TestExcelWriter.test_to_excel_timedeltaJ  sP    I!!!$$--c2G-DDE(
 
 

 7799sGMM"@"@AA5	"3---BB
 
 	I'222y!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L
h/////s   	C--C14C1c           	      L   t          t          j                            d                              d          t          t          d                    t          ddd                    }|                    d	          	                                
                    d
          }|                    |d           t          |          5 }t          j        |dd          }d d d            n# 1 swxY w Y   t          j        ||
                    d
                     d S )NrK   r)  r*  r+  r   rr   r,  r   MEMsht1r   r   r   )r
   rc   r
  r  r  r   r   r   resamplemean	to_periodrV   r   rW   rX   rY   rZ   )r[   r2   r^   rT  rw   rS  s         r   test_to_excel_periodindexz)TestExcelWriter.test_to_excel_periodindex_  sH   I!!!$$44V<<$v,,''\13???
 
 

 [[##%%//44
I&111y!! 	GVv&AFFFB	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G
b",,s"3"344444s   C11C58C5c                    t          j        t          |j                  dz  t           j                                      dd          }t          j        |ddg          }||_        |                    |dd	           |                    |dd
dg           |                    |d|           t          |          5 }t          j        |dddg          }d d d            n# 1 swxY w Y   t          j        ||           d S )NrK   r  r   firstsecondr   r  Fr  rq   rr   r  rd  r   rH   r   )rc   arangerK  rQ   r<  reshaper   r   rV   r   rW   rX   rY   rZ   )r[   r)   r!   r2   arrays	new_indexrw   r^   s           r   test_to_excel_multiindexz(TestExcelWriter.test_to_excel_multiindexn  sI   3u{++a/rx@@@HHBOO*6'89LMMM	yWUCCCyWsCjIII 	yW+NNNy!! 	MVv'aVLLLB	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M
eR(((((s   C((C,/C,c                 J   t          g dg dt          j                            d                              d          d          }|                    ddg          }|                    ||           t          j        |d	d
g          }t          j	        ||           d S )N)NrK   rC   )r   r     rK   rC   rq   rr   r[  rq   rr   r   r   rH   r   )
r
   rc   r
  r  r\  rV   rW   rX   rY   rZ   )r[   r)   r2   r^   df1s        r   "test_to_excel_multiindex_nan_labelz2TestExcelWriter.test_to_excel_multiindex_nan_label}  s    !\\!\\Y**1--44Q77 
 
 \\3*%%
I;777mI!Q888
b#&&&&&r   c                    t          g dg dg dd          }t          j        t          |j                  dz  t          j                                      dd          }t          j        |dd	g
          }||_        t          j	        g d          }||_
        |                    |d|           t          |          5 }t          j        |dddgddg          }d d d            n# 1 swxY w Y   t          j        ||           t          |          5 }t          j        |dd d           }d d d            n# 1 swxY w Y   t          t          j        t          j        ddddgt          j        t          j        d	dddgddt          j        dddgt          j        dt          j        dddgddt          j        dddgd          }	|s
d|	j        d <   t          j        ||	           d S )!Nr   rB   r      )r      ri  r  rK   r  r   r  r  r   ))(   rH   )r  rK   )2   rH   r  rd  r   rH   rP   rR   rt   rC   rB   r   g      D@g      ?g       @      @g      @g      @g      @g      I@g      @g       @g      "@)r   rH   rK   rC   rB   )r   rC   )r
   rc   r  rK  rQ   r<  r  r   r   from_tuplesr#   rV   r   rW   rX   rY   rZ   rd   loc)
r[   r)   r2   r!   r  r  new_cols_indexrw   r_   r\   s
             r   test_to_excel_multiindex_colsz-TestExcelWriter.test_to_excel_multiindex_cols  s   YYYYYY 
 
 3u{++a/rx@@@HHBOO*6'89LMMM	#/0K0K0KLL&yW+NNN y!! 	V]7Aq6aV  F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	fe,,, y!! 	V]744  F	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 FBFGQ15FBFHaA6#rvsC5FCc37#rvsC5 
 
  	&!%HL
fh/////s$   C//C36C3EE
Ec           	         t          |          }t          t          j                            d                              d          t          t          d                    t          ddd                    }t          j
        |j                            |          t          j        t          |j                  t          j        	          gd
dg          |_        |                    |d|           t#          |          5 }t%          j        |dddg          }d d d            n# 1 swxY w Y   t)          j        ||           |j        j        dk    sJ d S )NrK   r)  r*  r+  r   rr   r,  r   r  timerh   r   r  rd  r   rH   r   )r  rh   )r   r
   rc   r
  r  r  r   r   r   r   r   rQ   r   r  rK  r<  rV   r   rW   rX   rY   rZ   rs   )r[   r)   r2   r0  rM  rw   r#  s          r   test_to_excel_multiindex_datesz.TestExcelWriter.test_to_excel_multiindex_dates  s   I&&I!!!$$44V<<$v,,''\13???
 
 

 #.%%d++	#gm,,BH=== 5/
 
 
 	wKPPPy!! 	QV]6g!QPPPF	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	Q 	gv...|!_444444s   
D00D47D4c                 n   t          ddgddgddgd          }|                                }t          j        dd	g          }||_        |                    |d
d           t          |          5 }t          j        |d
          }d d d            n# 1 swxY w Y   t          j
        ||           d S )Nr   r  r  r  r  <   )rk   rl   c)F   P   )Z   rI   r  Frp   r   )r
   r   r   r  rQ   rV   r   rW   rX   rY   rZ   )r[   r2   frame1r  multi_indexrw   frame3s          r   'test_to_excel_multiindex_no_write_indexz7TestExcelWriter.test_to_excel_multiindex_no_write_index  s     "bRBxHHII  ,h	-BCC" 		gUCCC y!! 	?V]6g>>>F	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	ff-----s   2BBBc                 V   t          g g d          }t          g t          j        g ddg          dg          }|                    |d	           t	          |          5 }t          j        |d	          }d d d            n# 1 swxY w Y   t          j        ||d
d
           d S )N)r   rH   rK   rm   r   rH   r   rK   rq  r  r   F)check_index_typecheck_dtype)	r
   r   r  rV   r   rW   rX   rY   rZ   )r[   r2   r\   r^   rw   r_   s         r   test_to_excel_empty_multiindexz.TestExcelWriter.test_to_excel_empty_multiindex  s    R333r!71a&!I!I!ITUSVWWW
I'222y!! 	?V]6g>>>F	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	?
Hu%	
 	
 	
 	
 	
 	
s   #BB
B
c                    t          g t          j        g ddg          t          j        dg                    }|                    |           t	          j        |ddgddg          }t          j        ||           d S )Nr   rH   r   rq   rr   rq  r   )r
   r   r  rV   rW   rX   rY   rZ   r[   r2   r^   r_   s       r   (test_to_excel_empty_multiindex_both_axesz8TestExcelWriter.test_to_excel_empty_multiindex_both_axes  s    (Aq6:::*J<88
 
 

 	Iy!QAq6JJJ
fb)))))r   c                 L   t          g dg dgddgg d          }|                    |dd	           t          |          5 }t          j        |dd
          }d d d            n# 1 swxY w Y   t          g dg dgddgg d          }t          j        ||           d S )Ng~Ϛ?g9DܜJ?g>D)?g.4i(@33333@̤Arq   rr   r   r   rQ  rq  r  %.2frP   float_formatr   r   gQ?gq=
ףp?g=
ףp=?gp=
ף(@r  r  )r
   rV   r   rW   rX   rY   rZ   r[   r2   r^   rw   r_   r\   s         r   test_to_excel_float_formatz*TestExcelWriter.test_to_excel_float_format  s-   +++-K-K-KL*#OO
 
 

 	I'GGGy!! 	LV]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L !>!>!>?*#OO
 
 

 	fh/////s   A((A,/A,c                    t          ddt          d          gddt          d          ggddgg d          }|                    |           t          |          5 }t	          j        |d	t          
          }d d d            n# 1 swxY w Y   t          g dg dgddgg dt                    }t          j        ||           d S )NGz?1.23=
ףp=@4.56rq   rr   r  rq  r   )rt   r:  )r  r  r  )r  r  r  )rQ   r#   r:  )	r
   r   rV   r   rW   rX   objectrY   rZ   r  s         r   !test_to_excel_datatypes_preservedz1TestExcelWriter.test_to_excel_datatypes_preserved  sB    vwv/vwv/ *#OO
 
 
 	Iy!! 	FV]6QfEEEF	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F $$$$$$ *#OO
 
 
 	fh/////s   BB
B
c                     t          g dg dgddgg d          }|                    |d           t          j        |dd	
          }t	          j        ||           d S )N)u   ƒu   Ɠu   Ɣ)u   ƕu   Ɩu   Ɨu   Aƒrr   )u   XƓr   rQ  rq  	TestSheetr   r   r   rU   r  s       r   test_to_excel_output_encodingz-TestExcelWriter.test_to_excel_output_encoding.  s    +++-K-K-KLc")))
 
 
 	I+666y[ANNN
fb)))))r   c                    |d| z  }|                                  t          g dg dgddgg d          }|                    |dd	
           t          |          5 }t	          j        |dd          }d d d            n# 1 swxY w Y   t          g dg dgddgg d          }t          j        ||           d S )Nu   ƒu.r  r  rq   rr   r  rq  r  r  r  r   r   r  r  )r-   r
   rV   r   rW   rX   rY   rZ   )r[   r/   r0   r]   r^   rw   r_   r\   s           r   test_to_excel_unicode_filenamez.TestExcelWriter.test_to_excel_unicode_filename:  sP   ....+++-K-K-KL*#OO
 
 

 	HvFFFx   	LF]6gKKKF	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L 	L !>!>!>?*#OO
 
 

 	fh/////s    BBBuse_headersTFr_idx_nlevelsr   c_idx_nlevelsc                    dfd	}|rdnd } |t          dg          ||          }|j        dk    sJ |j        d         t          j        usJ dd|dk    r.t          d	 t                    D             t          
          }	nFt          j	        fdt          |          D             d t          |          D                       }	|dk    r.t          d t                    D             t          
          }
nFt          j	        fdt          |          D             d t          |          D                       }
t          t          j
        f          |	|
          }|dk    rFd}t          j        t          |          5   |||d           d d d            d S # 1 swxY w Y   d S  |||          }|r|j        |z   fk    sJ n|j        dz
  |z   fk    sJ t          t          |j                            D ]C}t          t          |j                            D ]}|j        ||f         t          j        usJ  Dd S )NTr   c                     |                      ||           t                    5 }t          j        ||j        d         |          cd d d            S # 1 swxY w Y   d S )N)rR   r)   rQ   r   r  )rV   r   rW   rX   rL  )datarR   
parser_hdrrQ   r`  r)   r2   s        r   	roundtripz;TestExcelWriter.test_excel_010_hemstring.<locals>.roundtripT  s    MM&k     9%% }2>!#4Z                   s   "AA A)rH   rK   )r   r   r   rC   rH   c                     g | ]}d | S )za-r   r   r   s     r   r   z<TestExcelWriter.test_excel_010_hemstring.<locals>.<listcomp>m  s    <<<!X!XX<<<r   r  c                 .    g | ]}t                    S r   r   )r   r   ncolss     r   r   z<TestExcelWriter.test_excel_010_hemstring.<locals>.<listcomp>p      <<<!u<<<r   c                     g | ]}d | S zi-r   r  s     r   r   z<TestExcelWriter.test_excel_010_hemstring.<locals>.<listcomp>q      >>>AxAxx>>>r   r   c                     g | ]}d | S )zb-r   r  s     r   r   z<TestExcelWriter.test_excel_010_hemstring.<locals>.<listcomp>t  s    :::888:::r   c                 .    g | ]}t                    S r   r   )r   r   nrowss     r   r   z<TestExcelWriter.test_excel_010_hemstring.<locals>.<listcomp>w  r  r   c                     g | ]}d | S )zj-r   r  s     r   r   z<TestExcelWriter.test_excel_010_hemstring.<locals>.<listcomp>x  r  r   r   z_Writing to Excel with MultiIndex columns and no index \('index'=False\) is not yet implemented.r   Fr   )Tr   T)r
   r   r   rc   rd   r   r   r  r   r   r   r   r   NotImplementedErrorrK  rQ   r#   )r[   r)   r  r  r  r2   r  parser_headerr   r#   rQ   r^   r  rr  r  r  s    `   `         @@r   test_excel_010_hemstringz(TestExcelWriter.test_excel_010_hemstringN  s=   	 	 	 	 	 	 	 )2di	1#]CCyF""""x~RV++++ 
 A<<uU||<<<FKKKGG ,<<<<u]';';<<<>>})=)=>>>  G A::U5\\:::&IIIEE*<<<<u]';';<<<>>})=)=>>>  E
 GUEN##
 
 
 1>  2#>>> 8 8	"k77778 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 )B,,C GyUEM,A$BBBBBB yUQY0E$FFFFF 3sy>>** 8 8s3;//00 8 8A8AqD>7777788 8s   F22F69F6c                    t          g dg dg dgg d          }|                    |d           t          g dg dg dgg d          }t          j        |dd          }t	          j        ||           t          g d	g d
gg d          }|                    |d           t          j        |dd          }t          g d	g d
gg d          }t	          j        ||           |                    |ddd           t          j        |dd           }t          g d	g d
g          }t	          j        ||           d S )Nr   )rq   rr   rr   rm   r  r   )rq   rr   B.1r   r   )rH   rK   rC   rB   )r   r  r   r  )rq   rr   rq   rr   )rq   rr   A.1r  FrO   r  rU   r[   r2   r^   r\   r_   s        r   test_duplicated_columnsz'TestExcelWriter.test_duplicated_columns  s   			999iii8///RRR
I'222YY			999-7H7H7H
 
 

 yWJJJ
fh/// lll3=Q=Q=QRRR
I'222yWJJJ\\<<<(2J2J2J
 
 
 	fh/// 	I'uMMMyWTJJJlllLLL9::
fh/////r   c                    t          g dg dd          }|                    |dddg           t          j        |dd	          }t	          j        |d         |d                    t	          j        |d         |d                    d S )
NrH   rH   rH   rK   rK   rK   r  r  rr   rq   r  r   r  )r
   rV   rW   rX   rY   assert_series_equal)r[   r2   write_frame
read_frames       r   test_swapped_columnsz$TestExcelWriter.test_swapped_columns  s    iiiiii @ @AAY7S#JOOO]9KKK

{3/CAAA
{3/CAAAAAr   c                 h   t          g dg dd          }t          j        t          d          5  |                    |dddg	           d d d            n# 1 swxY w Y   t          j        t          d
          5  |                    |dddg	           d d d            d S # 1 swxY w Y   d S )Nr
  r  r  zNot all names specifiedr   r  rr   r[  r  z.'passes columns are not ALL present dataframe'r   )r
   r   r   KeyErrorrV   )r[   r2   r  s      r   test_invalid_columnsz$TestExcelWriter.test_invalid_columns  sr   iiiiii @ @AA]8+DEEE 	T 	T  wc
 SSS	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T ]L
 
 
 	T 	T   wc
 SSS	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	T 	Ts#   AA A?B''B+.B+z#to_excel_index,read_excel_index_col)Tr   )FNc                     t          g dg dg dd          }|                    |dddg|           |ddg         }t          j        |d|	          }t	          j        ||           d S )
Nr
  r  )rC   rC   rC   r  col_subset_bugrq   rr   )rP   r#   rQ   r   rU   )r[   r2   to_excel_indexread_excel_index_colr  r\   r  s          r   test_write_subset_columnsz)TestExcelWriter.test_write_subset_columns  s      iiiiiiiii P PQQ'#J 	 	 	
 	
 	
 Sz*]"2>R
 
 

 	h
33333r   c                 $   t          g dg dd          }|                    |d           t          j        |dd          }d |j        d<   d |j        d	<   d |j        d
<   t          j        |ddd          }t          j        ||           d S )Nonez#oner  twor  z#twor  test_cr   r   r   )rH   r   rH   rH   )rK   rH   #rP   commentrt   )r
   rV   rW   rX   r   rY   rZ   r[   r2   r^   result1result2s        r   test_comment_argz TestExcelWriter.test_comment_arg  s     333:P:P:PQQRR
I(333 -	h!LLL!T!T!T-(C1
 
 
 	gw/////r   c                     t          g dg dd          }|                    |d           t          j        |d          }t          j        |dd           }t	          j        ||           d S )Nr  r  r  r  r   )rP   r!  rU   r"  s        r   test_comment_defaultz$TestExcelWriter.test_comment_default  s    
 333:P:P:PQQRR
I(333 -	h???-	hMMM
gw/////r   c                     t          g dg dd          }|                    |d           t          g dg dd          }t          j        |ddd	
          }t	          j        ||           d S )Nr  r  r  r  r   )r  Nr  )r  NNr  r   r   rU   r  s        r   test_comment_usedz!TestExcelWriter.test_comment_used  s     333:P:P:PQQRR
I(333 #7#7#7>Q>Q>QRRSSyXsVWXXX
fh/////r   c                     t          ddgddgd          }|                    |d           t          dgd	gd          }t          j        |d
          }t	          j        ||           d S )N1z#223)rk   rl   Fr   rH   rK   r  )r!  rU   r  s        r   test_comment_empty_linez'TestExcelWriter.test_comment_empty_line  s     c4[Sz::;;
IU+++ A3aS1122y#666
fh/////r   c                    t          |          }t          dddddd          t          dddddd          t          ddddd	d
          t          dddddd          t          dddddd          t          dddddd          t          dddddd          t          dddddd          t          dddddd          t          dddddd          t          dddddd          g}t          d|i          }|                    |d            t	          j        |dd!          }|                    d"| d#          }t          j        |d         |d                    d S )$Ni  rH   rn  rK   rC   -   8   rB      1   r  *   r   9   #   ri  )   rm  r}            5      %   r      r  4   rq   r   r   r  rr  rs  )	r   r   r
   rV   rW   rX   r   rY   r  )r[   r2   r0  	datetimesr  r  r\   s          r   test_datetimeszTestExcelWriter.test_datetimes!  s|   I&&T1b!Q**T1b!R,,T1b!R,,T1b!R,,T1b!R,,T1b!R,,T1b"b"--T1b"a,,T1b"b!,,T1b"b!,,T1b"b"--
	  i 011Y8<<<]9!LLL
%%mDmmm44
x}jo>>>>>r   c                    t                      5 }t          t          j                            d                              d                    }t          ||          5 }|                    |           d d d            n# 1 swxY w Y   |                    d           t          j
        |d          }t          j        ||           d d d            d S # 1 swxY w Y   d S )NrK   r  r6   r   r   )r   r
   rc   r
  r  r  r   rV   seekrW   rX   rY   rZ   )r[   r6   bior^   rv   	reread_dfs         r   test_bytes_iozTestExcelWriter.test_bytes_io9  sI   YY 		1#290033CCGLLMMB S000 $FF###$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ HHQKKKcQ777I!"i000		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1 		1s7   AC B6CB	C	B	
ACC!Cc                 t   t          ddddddg          }dddd}d	|d
<   d	|d<   |d
k    r$t          j                            |          sd|d
<   t	          j        t          t          j        ||                             5  |	                    ||ddi           d d d            d S # 1 swxY w Y   d S )NrH   rK   r  rC   rB   zBOpenDocumentSpreadsheet() got an unexpected keyword argument 'foo'z3__init__() got an unexpected keyword argument 'foo')r?   r:   r>   z<Workbook.__init__() got an unexpected keyword argument 'foo'r:   r>   z8load_workbook() got an unexpected keyword argument 'foo'r   rh   ri   )r6   engine_kwargs)
r
   osr   existsr   r   	TypeErrorreescaperV   )r[   r6   r2   r^   msgss        r   test_engine_kwargsz"TestExcelWriter.test_engine_kwargsF  s9   aa((*:*:;<<NP	
 
 K 	Z K 	\
 Zy(A(AK  ]9BId6l,C,CDDD 	 	KK$en    	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   B--B14B1c                 z   t          dddgdddgg dg dd	          }|                    |d
           t          j        |d
dd          }|                                }|j                            t                    |_        |j        	                    d          |_        t          j        ||           d S )Nrk   rl   r  erK   )r   f)rH   rK   r  )applebananacherry)mixednumericr.   r   r   r   r  r<  )r
   rV   rW   rX   r   rW  r  r.   rX  r   rY   rZ   r[   r2   r^   readr\   s        r   test_write_lists_dictz%TestExcelWriter.test_write_lists_dicte  s    Sz1+=+=>&;;444 
 
 	I(333}Y8AQRSSS7799!--c22#+227;;
dH-----r   c                     t          ddgddgd          }|                    |d           t          j        |dd	          }|}t	          j        ||           d S )
NrH   rK   rC   rB   )renderr  r   r   r   r   rU   rY  s        r   test_render_as_column_namez*TestExcelWriter.test_render_as_column_namew  si    1a&1a&99::
I(333}YA>>>
dH-----r   c                    t          ddggddgt                    }|                    ddd                              d	          }|                    |           t          j        |dgdgd
          }t          j        ||           d S )Nrh   ri   col1col2r  TF)rh   ri   r   r   )true_valuesfalse_valuesrt   )	r
   r  replacer   rV   rW   rX   rY   rZ   )r[   r2   r^   r\   r  s        r   !test_true_and_false_value_optionsz1TestExcelWriter.test_true_and_false_value_options  s    '&&1APPP::d599::AA&II
I]E7%A
 
 

 	j(33333r   c                     t          ddgddggddg          }|                    |dd	
           t          j        |d          }t	          j        ||           d S )NrH   rK   rC   rB   r`  ra  rm   r   r  )rP   freeze_panesr   r   rU   )r[   r2   r\   r_   s       r   test_freeze_panesz!TestExcelWriter.test_freeze_panes  sn    q!fq!f-7GHHH)vNNNyA666
fh/////r   c           
         t          dt          j        d                              d          z  t	          t          d                    t	          d t          d          D                                 }t          |j        |          }t          t          j
        d	
          }t          j        ||t          j        |                    }t          j        ||           d S )Nr   x   )r  rB   r*  c                     g | ]}d | S r  r   r  s     r   r   z6TestExcelWriter.test_path_path_lib.<locals>.<listcomp>  s    555aa555r   r  r   rC  r   r   )r
   rc   r  r  r   r   r   r   rV   rW   rX   rY   round_trip_pathlibpathlibPathrZ   )r[   r6   r2   r^   rv   rw   r_   s          r   test_path_path_libz"TestExcelWriter.test_path_path_lib  s    ")C..((111$v,,''5559955566
 
 

 V444!444&vvw|I7N7NOO
fb)))))r   c                 8   t          j        t          j        d          t          j        d          ft          j        d          t          j        d          fg          }t	          t          j        dd          |          }|                    |           t          j        |dd	gd
          }|j	        
                    d |j        d         D             d |j        d	         D             gdd	g          |_	        t          j        ||           d S )N20182018Q12018Q2)rK   rK   r<  r  rm   r   rH   r   c                 ,    g | ]}t          |          S r   r.   r  s     r   r   zCTestExcelWriter.test_merged_cell_custom_objects.<locals>.<listcomp>  s    +++c!ff+++r   c                 ,    g | ]}t          |          S r   ru  r  s     r   r   zCTestExcelWriter.test_merged_cell_custom_objects.<locals>.<listcomp>  s    -K-K-Kc!ff-K-K-Kr   r   )r   r  rW   Periodr
   rc   r   rV   rX   r#   r   r   rY   rZ   )r[   r2   mir\   r_   s        r   test_merged_cell_custom_objectsz/TestExcelWriter.test_merged_cell_custom_objects  s   #6""BIh$7$786""BIh$7$78
 
 RWV7;;;RHHH)$$$y!Q1EEE#+66++bil+++-K-Kbil-K-K-KLa& 7 
 
 	fh/////r   r:  Nc                    |}t          j        d|          }t          |g|          }t          j        t
          d          5  |                    |           d d d            n# 1 swxY w Y   |                                }t          |g|          }t          j        t
          d          5  |                    |           d d d            d S # 1 swxY w Y   d S )N2019)tzr  zExcel does not supportr   )rW   r   r
   r   r   r   rV   to_pydatetime)r[   r:  tz_aware_fixturer2   r|  r  r^   s          r    test_raise_when_saving_timezonesz0TestExcelWriter.test_raise_when_saving_timezones  sa    |Fr***vU+++]:-EFFF 	# 	#KK	"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# !!##vU+++]:-EFFF 	# 	#KK	"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s$   A((A,/A,4CCCc                     t          ddgddgd          }|                    |g dd           t          j        |          }t          g d	g d
gg d          }t	          j        ||           d S )Nr   rH   r   r}   r  )rq   rr   rq   Fr   )r   r   r   )rH   r}   rH   )rq   rr   r  rm   rU   )r[   r2   r^   r_   r\   s        r   'test_excel_duplicate_columns_with_namesz7TestExcelWriter.test_excel_duplicate_columns_with_names  s    aV2r(3344
IeDDDy))jjj***5?P?P?PQQQ
fh/////r   c                     d}t          j        t          t          j        |                    5  t          |d           d d d            d S # 1 swxY w Y   d S )Nz7if_sheet_exists is only valid in append mode (mode='a')r   rd  )if_sheet_exists)r   r   r   rM  rN  r   )r[   r2   r  s      r   test_if_sheet_exists_raisesz+TestExcelWriter.test_if_sheet_exists_raises  s    G]:RYs^^<<< 	> 	>	9====	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>s   AAAc                    t          ||          5 }t                                          |           d d d            n# 1 swxY w Y   t          j        |          }t                      }t          j        ||           d S NrC  )r   r
   rV   rW   rX   rY   rZ   )r[   r6   r2   rv   r_   r\   s         r   test_excel_writer_empty_framez-TestExcelWriter.test_excel_writer_empty_frame  s    6222 	)fKK  (((	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	)y));;
fh/////s   "A  AAc                     t                                          ||           t          j        |          }t                      }t	          j        ||           d S r  rU   )r[   r6   r2   r_   r\   s        r   test_to_excel_empty_framez)TestExcelWriter.test_to_excel_empty_frame  sP    Yv666y));;
fh/////r   c                     t          dddz  gi          }d}t          j        t          |d          5  t	                      }|                    |           d d d            d S # 1 swxY w Y   d S )Nrq   rk   i   z?Cell contents too long \(32768\), truncated to 32767 charactersF)r   raise_on_extra_warnings)r
   rY   assert_produces_warningUserWarningr   rV   )r[   r^   r  bufs       r   >test_to_excel_raising_warning_when_cell_character_exceed_limitzNTestExcelWriter.test_to_excel_raising_warning_when_cell_character_exceed_limit  s    cEk]+,,P'sE
 
 
 	 	 ))CKK		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   $A%%A),A)
with_indexc                    t          j        ddddddddg          }|dv rOt          j        t          d	
          5  |                    ||dd           d d d            d S # 1 swxY w Y   d S |                    ||d|           t          j        d          }t          j        |	                    |                    5 }|j
        }|j        j        J |r|j        j        dk    snnJ d d d            d S # 1 swxY w Y   d S )NrH   rK   rC   r  rB   r   r  r?   %Autofilter is not supported with odf!r   TFr6   
autofilterrQ   r:   zA1:D3r
   	from_dictr   r   r   rV   importorskip
contextlibclosingload_workbookactiveauto_filterref)r[   r6   r  r2   r^   r:   wbwss           r   test_autofilterzTestExcelWriter.test_autofilter  s     ":":!!RS<T<T!UVVW"I   T T IfUSSST T T T T T T T T T T T T T T T T T
 KK	&TKTTT* H #H$:$:9$E$EFF P"Y~)5558BOr~)W44444O	P P P P P P P P P P P P P P P P P Ps#   A%%A),A),C??DDc                    t          j        ddddddddg          }|dv rOt          j        t          d	
          5  |                    ||dd           d d d            d S # 1 swxY w Y   d S |                    ||ddd           t          j        d          }t          j        |	                    |                    5 }|j
        }|j        j        J |j        j        dk    sJ 	 d d d            d S # 1 swxY w Y   d S )NrH   rK   rC   r  rB   r   r  r  r  r   TFr  r   )r6   r  startrowstartcolr:   zK11:N13r  )r[   r6   r2   r^   r:   r  r  s          r   &test_autofilter_with_startrow_startcolz6TestExcelWriter.test_autofilter_with_startrow_startcol  s    ":":!!RS<T<T!UVVW"I   T T IfUSSST T T T T T T T T T T T T T T T T T
 KK&TBQS     * H #H$:$:9$E$EFF 7"Y~)555~)Y66666	7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7s#   A%%A),A)(C==DDr)   c                    t          dddd          }|                    ddg          }|dv rPt          j        t          d	          5  |                    ||d
d|           d d d            d S # 1 swxY w Y   d S |rPt          j        t          d	          5  |                    ||d
d
|           d d d            d S # 1 swxY w Y   d S |                    ||d
d
|           t          j        d          }t          j        |	                    |                    5 }|j
        }|j        j        J |j        j        dk    sJ 	 d d d            d S # 1 swxY w Y   d S )N)horser  dogr  )blackwhitegreyr  )BlackyWendyRufusCatchy)animalcolor of furr_  r  r  r  r  r   TFr6   r  rQ   r)   wExcel filters merged cells by showing only the first row. 'autofilter' and 'merge_cells' cannot be used simultaneously.r:   zA1:C5)r
   r\  r   r   r   rV   r  r  r  r  r  r  r  )	r[   r6   r2   r)   r^   mi_dfr:   r  r  s	            r   %test_autofilter_with_multiindex_indexz5TestExcelWriter.test_autofilter_with_multiindex_index  s    : C> 
 
 h788W"I   	 	 !# +    	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  	5P    
 !# +                      NN'     * H #H$:$:9$E$EFF 5"Y~)555~)W44444	5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5s6   
A22A69A6CCC&(EE #E c                    t          ddgddggg dg dg          }t          g dg d	g|
          }|dv rPt          j        t          d          5  |                    ||dd|           d d d            d S # 1 swxY w Y   d S |rPt          j        t          d          5  |                    ||dd|           d d d            d S # 1 swxY w Y   d S |                    ||dd|           t          j        d          }t          j        |	                    |                    5 }|j
        }|j        j        J |j        j        dk    sJ 	 d d d            d S # 1 swxY w Y   d S )Nr   ywt)r   r   rH   )r   rH   r   )r   codesr   r  rm   r  r  r   TFr  r  r:   zA2:D5)r   r
   r   r   r   rV   r  r  r  r  r  r  r  )	r[   r6   r2   r)   r#   r^   r:   r  r  s	            r   'test_autofilter_with_multiindex_columnsz7TestExcelWriter.test_autofilter_with_multiindex_columnsN  s    #Jc
+99iii(
 
 
 			999-w???W"I   	 	 !# +    	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  	5P    
 !# +                      KK'     * H #H$:$:9$E$EFF 5"Y~)555~)W44444	5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5s6   A<<B B &CCC0(E&&E*-E*)Lr   r   r   r  r  r  r$  r'  r1  r3  r   r   r   rc   int8int16int32r<  r?  float16float32float64rA  rE  rH  rN  rU  r]  ra  rf  r~  filterwarningsr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r%  r'  r)  r.  rA  rG  rP  r[  r^  re  rh  ro  ry  r  r  r  r  r  r  r  r  r  r  r  r   r   r   r   r   w  sS       .' ' '"# # # 5 5 534 34 34j3 3 30 0 0(C C C [Y"(BHbh(OPP2 2 QP2& [YRZ(LMM* * NM* 
* 
* 
** * *"0 "0 "0H& & &$A* A* A*F
* 
* 
*0 0 0200 00 00d [A 0 0 0&0 0 0&0 0 0*5 5 5) ) )' ' '"*0 *0 *0X5 5 5.. . .*
 
 
	* 	* 	*0 0 0$0 0 0<
* 
* 
*0 0 0( []T5M::[_iii88[_iii88E8 E8 98 98 ;:E8N0 0 0:B B B
T 
T 
T [-	
 4 4 4&0 0 0*0 0 00 0 0
0 
0 
0? ? ?01 1 1  >. . .$. . .	4 	4 	40 0 0
* 
* 
*0 0 0$ [WtVn55# # 65#0 0 0> > >0 0 00 0 0   [\D%=99P P :9P*7 7 70 []T5M::65 65 ;:65p []T5M::35 35 ;:35 35 35r   r   c                       e Zd Zej                            d ej        ed ej	        d                     ej        e
d ej	        d                    g          d             Zd Zd Zd	S )
TestExcelWriterEngineTestsz	klass,extr9   r>   r<   r:   c                     t          |          5 }|dk    r6t          t          dd                    rt          |t                    sJ nt          ||          sJ d d d            d S # 1 swxY w Y   d S )Nr9   r>   ignore)errors)r   r   r	   
isinstancer   )r[   klassr/   r2   rv   s        r   test_ExcelWriter_dispatchz4TestExcelWriterEngineTests.test_ExcelWriter_dispatch  s     ## 	1vg~~$*<III# #~ "&+666666!&%00000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1s   AA,,A03A0c                     t          j        t          d          5  t          d           d d d            d S # 1 swxY w Y   d S )Nz	No enginer   nothing)r   r   r   r   r[   s    r    test_ExcelWriter_dispatch_raisesz;TestExcelWriterEngineTests.test_ExcelWriter_dispatch_raises  s    ]:[999 	# 	#	"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s   9= =c           	          G d dt                     }t          |           t          dd          5  |dz  }|                                 t          |          5 }t	          ||          sJ 	 d d d            n# 1 swxY w Y   t          dgt          dgd	          t          d
gd	                    }|                    |           |                                 d d d            n# 1 swxY w Y   |dz  }|                                 |                    |d           |                                 d S )Nc                   `    e Zd ZdZdZdZdZdZd Zd Z	d Z
ed             Zed             Zd	S )
CTestExcelWriterEngineTests.test_register_writer.<locals>.DummyClassF)xlsxxlsrY  c                     d S r&   r   r  s    r   bookzHTestExcelWriterEngineTests.test_register_writer.<locals>.DummyClass.book  s    r   c                 .    dt          |           _        d S NT)typecalled_saver  s    r   _savezITestExcelWriterEngineTests.test_register_writer.<locals>.DummyClass._save  s    )-T

&&&r   c                 .    dt          |           _        d S r  )r  called_write_cells)r[   argskwargss      r   _write_cellszPTestExcelWriterEngineTests.test_register_writer.<locals>.DummyClass._write_cells  s    04T

---r   c                 .    dt          |           _        d S r  )r  called_sheetsr  s    r   r   zJTestExcelWriterEngineTests.test_register_writer.<locals>.DummyClass.sheets  s    +/T

(((r   c                 X    | j         sJ | j        sJ | j        rJ d| _         d| _        d S )NF)r  r  r  )clss    r   assert_called_and_resetz[TestExcelWriterEngineTests.test_register_writer.<locals>.DummyClass.assert_called_and_reset  sB    &&----,,,,"').&&&r   N)r   r   r   r  r  r  _supported_extensions_enginer  r  r  propertyr   classmethodr  r   r   r   
DummyClassr    s        K!&!M$3!G  . . .5 5 5 0 0 X0 / / [/ / /r   r  zio.excel.xlsx.writerrY  zsomething.xlsxrk   rl   rh   )r_  r  ri   r   zsomething2.xlsxrC  )	r   r   r   r-   r  r
   r   rV   r  )r[   r0   r  filepathrv   r^   	filepath2s          r   test_register_writerz/TestExcelWriterEngineTests.test_register_writer  s   	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/8 	
###2G<< 	1 	1"22HNNX&& 6&!&*5555556 6 6 6 6 6 6 6 6 6 6 6 6 6 6se%000SE...  B
 KK!!!..000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 00	
Ig...**,,,,,s6   )C/A<0C/<B 	 C/B 	AC//C36C3N)r   r   r   r   r   r   r'   r   td
skip_if_nor   r  r  r  r   r   r   r  r    s        [FLg]R]<5P5PQQQFL'z9R9RSSS	
 1 1 1# # #/- /- /- /- /-r   r  c                       e Zd Zd Zd ZdS )
TestFSPathc                 (   |dz  }|                                  t          dddgi          }|                    |           t          |          5 }t	          j        |          }d d d            n# 1 swxY w Y   |t          |          k    sJ d S )Nfoo.xlsxrq   rH   rK   )r-   r
   rV   r   rJ  fspathr.   )r[   r0   r   r^   r  r_   s         r   test_excelfile_fspathz TestFSPath.test_excelfile_fspath  s    *$

aV}%%
Dt__ 	#Yr]]F	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#T""""""s   A22A69A6c                     |dz  }|                                  t          |          5 }t          j        |          t	          |          k    sJ 	 d d d            d S # 1 swxY w Y   d S )Nr  )r-   r   rJ  r  r.   )r[   r0   r   rv   s       r   test_excelwriter_fspathz"TestFSPath.test_excelwriter_fspath  s    *$

 	2&9V$$D		11111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2s   (AA#&A#N)r   r   r   r  r  r   r   r   r  r    s2        # # #2 2 2 2 2r   r  r  c                     d t          t                    D             }d t          |           D             }|                    |          rJ d S )Nc                 <    h | ]}|                     d           |S r   
startswithr   r_  s     r   	<setcomp>z%test_subclass_attr.<locals>.<setcomp>  s)    PPP44??3;O;OP$PPPr   c                 <    h | ]}|                     d           |S r  r  r  s     r   r  z%test_subclass_attr.<locals>.<setcomp>  s)    KKKDdooc6J6JK4KKKr   )dirr   symmetric_difference)r  
attrs_baseattrs_klasss      r   test_subclass_attrr    sY     QP3{#3#3PPPJKKCJJKKKK..{;;;;;;;r   )<r  r   r   r   decimalr   	functoolsr   ior   rJ  rm  rM  r+   numpyrc   r   pandas.compat._optionalr	   pandas.util._test_decoratorsutil_test_decoratorsr  pandasrW   r
   r   r   r   r   r   pandas._testing_testingrY   pandas.io.excelr   r   r   r   r   pandas.io.excel._utilr   r.   r   fixturer!   r)   r2   r8   r   r   r'   r  rA   usefixturesr   r  r  valuesr  r   r   r   <module>r     s               
                   				  				       > > > > > > ) ) ) ) ) ) ) ) )                                       + * * * * *s s        ///000  10       	W]R]:%>%>f@U@U$VWWWW]R]:%>%>f@U@U$VWWWMBM,77v9N9NO	
 	
 	
 	V=2=#7#7888
 
U0 U0 U0 U0 U0 U0 U0
 
U0p  2=,,mbmF.C.CD	
 	
 	

 	 2=,,mbmF.C.CD	
 	
 	

 	 2=..f0E0EF	
 	
 	

 	UF-"-*>*>???! * &&u5 u5 u5 u5 u5 u5 u5 '&+ ,u5p'E- E- E- E- E- E- E- E-P vz2 2 2 2 2 2 2  2" /(/"3"344< < 54< < <r   