+
    xȇi%                       R t ^ RIHt ^ RIHtHtHtHtHt ^ RI	t	^ RI
t
^ RIt^ RIHtHtHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ R	IHtHtHtH t H!t! ^ RI"H#u H$t% ^ R
I&H't' ^ RI(H)t)H*t* ^ RI+H,t, ]'       d   ^ RI-H.t.H/t/H0t0H1t1H2t2 ^ RIH3t3  ! R R4      t4 ! R R]44      t5 ! R R4      t6 ! R R4      t7R# )zC
Utilities for conversion to writer-agnostic Excel representation.
)annotations)CallableHashableIterableMappingSequenceN)TYPE_CHECKINGAnycast)is_list_like)find_stack_level)missing)is_float	is_scalar)	DataFrameIndex
MultiIndexPeriodPeriodIndex)CSS4_COLORS)CSSResolver
CSSWarning)get_level_lengths)ExcelWriterMergeCellsFilePath
IndexLabelStorageOptionsWriteExcelBufferExcelWriterc                  .    ] tR t^?tRt]tRR R lltRtR# )	ExcelCellNc          
     ,    V ^8  d   QhRRRRRRRRRR/# )	   rowintcol
mergestart
int | NonemergeendreturnNone )formats   "g/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/io/formats/excel.py__annotate__ExcelCell.__annotate__C   s<     ! !! ! ! ! 
!    c                	N    Wn         W n        W0n        W@n        WPn        W`n        R # Nr$   r&   valstyler'   r)   )selfr$   r&   r5   r6   r'   r)   s   &&&&&&&r.   __init__ExcelCell.__init__C   s"     
$ r1   )r&   r)   r'   r$   r6   r5   r4   )NNN)__name__
__module____qualname____firstlineno__
__fields__	__slots__r8   __static_attributes__r,   r1   r.   r!   r!   ?   s    IJI! !r1   r!   c                  .   a  ] tR t^TtR V 3R lltRtV ;t# )CssExcelCellc               8    V ^8  d   QhRRRRRRRRRRR	RR
RRR/# )r#   r$   r%   r&   r6   dict | None
css_stylesz3dict[tuple[int, int], list[tuple[str, Any]]] | Nonecss_rowcss_colcss_converterCallable | Noner*   r+   r,   )r-   s   "r.   r/   CssExcelCell.__annotate__U   se     K KK K
 K HK K K 'K 
Kr1   c	                	   < V'       dV   V'       dN   WVV3,           U
Uu/ uF  w  rV
P                  4       VbK  	  pp
p\        VP                  4       4      pV! V4      p\        SV `  ! RR VRVRXRV/V	B  R# u upp
i )r$   r&   r5   r6   Nr,   )lower	frozensetitemssuperr8   )r7   r$   r&   r5   r6   rE   rF   rG   rH   kwargspropdeclaration_dictunique_declarations	__class__s   &&&&&&&&&,   r.   r8   CssExcelCell.__init__U   s     - 4>w>N3O 3Oid

c!3O    #,,<,B,B,D"E!"56EJSJcJsJ%J6J s   A9r,   )r:   r;   r<   r=   r8   r@   __classcell__)rT   s   @r.   rB   rB   T   s    K Kr1   rB   c                  8   ] tR t^mt$ Rt]tRRRRRRRRRRRR/tR	R
RR
RR
RR
RR
RR
RRRRRRRRRRRRRR/tRRRR
RR
/t	R^R^R^R^/t
RV U u/ uF  p V P                  4       V bK  	  up tR]R&   RWR! R" llt]! 4       tR# R$ ltR% R& ltR' R( ltR) R* ltR+ R, ltR- R. ltR/ R0 ltR1 R2 ltR3 R4 ltR5 R6 ltR7 R8 ltR9 R: ltR; R< ltR= R> ltR? R@ ltRA RB lt RC RD lt!RE RF lt"RG RH lt#RI RJ lt$RK RL lt%RM RN lt&RO RP lt'RQ RR lt(RS RT lt)RUt*R # u up i )XCSSToExcelConvertera  
A callable for converting CSS declarations to ExcelWriter styles

Supports parts of CSS 2.2, with minimal CSS 3.0 support (e.g. text-shadow),
focusing on font styling, backgrounds, borders and alignment.

Operates by first computing CSS styles in a fairly generic
way (see :meth:`compute_css`) then determining Excel style
properties from CSS properties (see :meth:`build_xlstyle`).

Parameters
----------
inherited : str, optional
    CSS declarations understood to be the containing scope for the
    CSS processed by :meth:`__call__`.
topztext-topmiddlecenterbaselinebottomztext-bottomboldTbolder600700800900normalFlighter100200300400500italicobliqueserifz
sans-serifcursivefantasyzdict[str, str] | None	inheritedNc                    V ^8  d   QhRRRR/# )r#   rp   
str | Noner*   r+   r,   )r-   s   "r.   r/    CSSToExcelConverter.__annotate__   s     A A* A Ar1   c                	    Ve   V P                  V4      V n        MR V n        \        P                  ! V P                  4      V n        R # r3   )compute_cssrp   	functoolscache_call_uncached_call_cached)r7   rp   s   &&r.   r8   CSSToExcelConverter.__init__   s:     !--i8DN!DN &OOD,?,?@r1   c                    V ^8  d   QhRRRR/# r#   declarationsz str | frozenset[tuple[str, str]]r*   dict[str, dict[str, str]]r,   )r-   s   "r.   r/   rs      s     / /</	"/r1   c                $    V P                  V4      # )a}  
Convert CSS declarations to ExcelWriter style.

Parameters
----------
declarations : str | frozenset[tuple[str, str]]
    CSS string or set of CSS declaration tuples.
    e.g. "font-weight: bold; background: blue" or
    {("font-weight", "bold"), ("background", "blue")}

Returns
-------
xlstyle : dict
    A style as interpreted by ExcelWriter when found in
    ExcelCell.style.
)ry   )r7   r}   s   &&r.   __call__CSSToExcelConverter.__call__   s    &   ..r1   c                    V ^8  d   QhRRRR/# r|   r,   )r-   s   "r.   r/   rs      s     . .<.	".r1   c                	Z    V P                  WP                  4      pV P                  V4      # r3   )ru   rp   build_xlstyle)r7   r}   
propertiess   && r.   rx   "CSSToExcelConverter._call_uncached   s)     %%lNNC
!!*--r1   c                    V ^8  d   QhRRRR/# )r#   propsMapping[str, str]r*   r~   r,   )r-   s   "r.   r/   rs      s      #4 9R r1   c                	   a R V P                  V4      RV P                  V4      RV P                  V4      RV P                  V4      RV P	                  V4      /pR V3R lloS! V4       V# )	alignmentborderfillfontnumber_formatc                    V ^8  d   QhRRRR/# )r#   ddict[str, str | None]r*   r+   r,   )r-   s   "r.   r/   7CSSToExcelConverter.build_xlstyle.<locals>.__annotate__   s     	! 	!0 	!T 	!r1   c                   < \        V P                  4       4       F9  w  rVf   W K  \        V\        4      '       g   K%  S! V4       V'       d   K7  W K;  	  R# )z4Remove key where value is None, through nested dictsN)listrN   
isinstancedict)r   kvremove_nones   &  r.   r   6CSSToExcelConverter.build_xlstyle.<locals>.remove_none   sA    QWWY94((N1D (r1   )build_alignmentbuild_border
build_fill
build_fontbuild_number_format)r7   r   outr   s   && @r.   r   !CSSToExcelConverter.build_xlstyle   so    --e4d''.DOOE*DOOE*T55e<
	! 	! 	C
r1   c                    V ^8  d   QhRRRR/# )r#   r   r   r*   zdict[str, bool | str | None]r,   )r-   s   "r.   r/   rs      s     
 
%6 
;W 
r1   c                	l    R VP                  R4      RV P                  V4      RV P                  V4      /# )
horizontalz
text-alignvertical	wrap_text)get_get_vertical_alignment_get_is_wrap_textr7   r   s   &&r.   r   #CSSToExcelConverter.build_alignment   s<     %))L144U;//6
 	
r1   c                    V ^8  d   QhRRRR/# )r#   r   r   r*   rr   r,   )r-   s   "r.   r/   rs     s      -> : r1   c                	n    VP                  R 4      pV'       d   V P                  P                  V4      # R# )zvertical-alignN)r   VERTICAL_MAP)r7   r   vertical_aligns   && r.   r   +CSSToExcelConverter._get_vertical_alignment  s.    #34$$((88r1   c                    V ^8  d   QhRRRR/# r#   r   r   r*   zbool | Noner,   )r-   s   "r.   r/   rs     s     O O'8 O[ Or1   c                	V    VP                  R 4      f   R# \        VR ,          R9  4      # )zwhite-spaceN)nowrapprezpre-line)r   boolr   s   &&r.   r   %CSSToExcelConverter._get_is_wrap_text  s*    99]#+E-(0MMNNr1   c                    V ^8  d   QhRRRR/# )r#   r   r   r*   z dict[str, dict[str, str | None]]r,   )r-   s   "r.   r/   rs     s     
 
&
	)
r1   c                	0   R Uu/ uF  pVRV P                  VP                  RV R24      VP                  RV R24      V P                  VP                  RV R24      4      4      RV P                  VP                  RV R24      4      /bK  	  up# u upi )rY   r6   zborder-z-stylez-widthz-colorcolor)rY   rightr]   left)_border_styler   color_to_excel)r7   r   sides   && r.   r    CSSToExcelConverter.build_border  s     ;

 ; ++IIvV45IIvV45''		GD62H(IJ
 ,,UYYf7M-NO  ;

 
	
 

s   BBc               (    V ^8  d   QhRRRRRRRR/# )r#   r6   rr   widthr   r*   r,   )r-   s   "r.   r/   rs     s,     7 77(27;E7	7r1   c                	j   Vf   Vf	   Vf   R # R# VR	9   d   R# V P                  V4      pVf   R# VR
9   d   V# VR8X  d   R# VR8X  d   VR9   d   R# R# VR8X  d   VR9   d   R# R# WP                  9   d   V P                  V,          # \        P                  ! RV: 2\        \        4       R7       R# )NnonedoubledottedmediumDashDotDotdashedmediumDashedzUnhandled border style format: 
stacklevel)r   hidden)Ngrooveridgeinsetoutsetsolid)hairthin)_get_width_nameBORDER_STYLE_MAPwarningswarnr   r   )r7   r6   r   r   
width_names   &&&& r.   r   !CSSToExcelConverter._border_style  s    " =U]} &&))%0
IIHH--%H--!+++((//MM1%;+-
 r1   c                    V ^8  d   QhRRRR/# )r#   width_inputrr   r*   r,   )r-   s   "r.   r/   rs   X  s      : * r1   c                	^    V P                  V4      pVR 8  d   R# VR8  d   R# VR8  d   R# R# )gh㈵>Ng?r   gffffff@mediumthick)_width_to_float)r7   r   r   s   && r.   r   #CSSToExcelConverter._get_width_nameX  s3    $$[14<S[S[r1   c                    V ^8  d   QhRRRR/# )r#   r   rr   r*   floatr,   )r-   s   "r.   r/   rs   b  s     ( (Z (E (r1   c                	0    Vf   RpV P                  V4      # )N2pt)_pt_to_float)r7   r   s   &&r.   r   #CSSToExcelConverter._width_to_floatb  s    =E  ''r1   c                    V ^8  d   QhRRRR/# )r#   	pt_stringstrr*   r   r,   )r-   s   "r.   r/   rs   g  s     - -c -e -r1   c                	h    VP                  R 4      '       g   Q h\        VP                  R 4      4      # )pt)endswithr   rstrip)r7   r   s   &&r.   r    CSSToExcelConverter._pt_to_floatg  s/    !!$''''Y%%d+,,r1   c                   V ^8  d   QhRR/# )r#   r   r   r,   )r-   s   "r.   r/   rs   k  s     X X 1 Xr1   c                	`    VP                  R 4      pVR9  d   RV P                  V4      RR/# R# )zbackground-colorNfgColorpatternTyper   )Ntransparentr   )r   r   )r7   r   
fill_colors   && r.   r   CSSToExcelConverter.build_fillk  s;     YY12
::t22:>wWW ;r1   c                    V ^8  d   QhRRRR/# )r#   r   r   r*   r   r,   )r-   s   "r.   r/   rs   r  s     # #): #?T #r1   c                	    VP                  R 4      p\        V\        4      '       d   VP                  RR4      MTpRV/# )znumber-format   §;format_code)r   r   r   replace)r7   r   fcs   && r.   r   'CSSToExcelConverter.build_number_formatr  s9    YY'&0S&9&9RZZc"rr""r1   c                    V ^8  d   QhRRRR/# )r#   r   r   r*   z$dict[str, bool | float | str | None]r,   )r-   s   "r.   r/   rs   w  s     
 
&
	-
r1   c                	   V P                  V4      pV P                  V4      pR V'       d
   V^ ,          MRRV P                  V4      RV P                  V4      RV P	                  V4      RV P                  V4      RRV9   d   RMRRR	V9   ;'       g    RR
V P                  VP                  R
4      4      RV P                  V4      /	# )nameNfamilysizer^   rk   	underlinesinglestrikezline-throughr   shadow)	_get_font_names_get_decoration_select_font_family_get_font_size_get_is_bold_get_is_italicr   r   _get_shadow)r7   r   
font_names
decorations   &&  r.   r   CSSToExcelConverter.build_fontw  s     ))%0
))%0
ZJqMTd..z:D''.D%%e,d))%0kZ&?(T~3<<T((7);<d&&u-
 	
r1   c                    V ^8  d   QhRRRR/# r   r,   )r-   s   "r.   r/   rs     s      "3  r1   c                	n    VP                  R 4      pV'       d   V P                  P                  V4      # R# )zfont-weightN)r   BOLD_MAP)r7   r   weights   && r.   r   CSSToExcelConverter._get_is_bold  s+    =)==$$V,,r1   c                    V ^8  d   QhRRRR/# r   r,   )r-   s   "r.   r/   rs     s      $5 + r1   c                	n    VP                  R 4      pV'       d   V P                  P                  V4      # R# )z
font-styleN)r   
ITALIC_MAP)r7   r   
font_styles   && r.   r  "CSSToExcelConverter._get_is_italic  s+    YY|,
??&&z22r1   c                    V ^8  d   QhRRRR/# r#   r   r   r*   Sequence[str]r,   )r-   s   "r.   r/   rs     s      %6 = r1   c                	P    VP                  R 4      pVe   VP                  4       # R# )ztext-decorationr,   )r   split)r7   r   r  s   && r.   r	  #CSSToExcelConverter._get_decoration  s+    YY01
!##%%Ir1   c                    V ^8  d   QhRRRR/# r   r,   )r-   s   "r.   r/   rs     s      !2 { r1   c                	b    R V9   d(   \        \        P                  ! RVR ,          4      4      # R# )ztext-shadowz^[^#(]*[1-9]N)r   researchr   s   &&r.   r  CSSToExcelConverter._get_shadow  s(    E!		.%2FGHHr1   c                    V ^8  d   QhRRRR/# r  r,   )r-   s   "r.   r/   rs     s      %6 = r1   c                	P   \         P                  ! R VP                  RR4      4      p. pV Fv  pVR,          R8X  d   V^R P                  RR4      pM4VR,          R8X  d   V^R P                  RR4      pMVP	                  4       pV'       g   Ke  VP                  V4       Kx  	  V# )	z(?x)
            (
            "(?:[^"]|\\")+"
            |
            '(?:[^']|\\')+'
            |
            [^'",]+
            )(?=,|\s*$)
        zfont-family :N   N"z\"'z\')r$  findallr   r   stripappend)r7   r   font_names_tmpr  r  s   &&   r.   r  #CSSToExcelConverter._get_font_names  s     IImR(
 
"DBx3Abz))%5bSAbz))%5zz|t!!$' # r1   c                    V ^8  d   QhRRRR/# )r#   r   r   r*   zfloat | Noner,   )r-   s   "r.   r/   rs     s     ' '$5 ', 'r1   c                	R    VP                  R 4      pVf   V# V P                  V4      # )z	font-size)r   r   )r7   r   r  s   && r.   r  "CSSToExcelConverter._get_font_size  s+    yy%<K  &&r1   c                    V ^8  d   QhRRRR/# )r#   r  r  r*   r(   r,   )r-   s   "r.   r/   rs     s      m 
 r1   c                	h    R pV F)  pV P                   P                  V4      pV'       g   K(   V# 	  V# r3   )
FAMILY_MAPr   )r7   r  r  r  s   &&  r.   r
  'CSSToExcelConverter._select_font_family  s9    D__((.Fv 
 r1   c                    V ^8  d   QhRRRR/# )r#   r5   rr   r*   r,   )r-   s   "r.   r/   rs     s      *  r1   c                	    Vf   R # V P                  V4      '       d   V P                  V4      #  V P                  V,          #   \         d.    \        P
                  ! RT: 2\        \        4       R7        R # i ; i)NzUnhandled color format: r   )_is_hex_color_convert_hex_to_excelNAMED_COLORSKeyErrorr   r   r   r   r7   r5   s   &&r.   r   "CSSToExcelConverter.color_to_excel  su    ;c""--c22	$$S)) 	MM*3'2+-
 	s   A 4A;:A;c                    V ^8  d   QhRRRR/# r#   color_stringr   r*   r   r,   )r-   s   "r.   r/   rs     s     2 2# 2$ 2r1   c                	6    \        VP                  R 4      4      # #)r   
startswith)r7   rD  s   &&r.   r<  !CSSToExcelConverter._is_hex_color  s    L++C011r1   c                    V ^8  d   QhRRRR/# )r#   rD  r   r*   r,   )r-   s   "r.   r/   rs     s        #  #  r1   c                	   VP                  R 4      pV P                  V4      '       dI   V^ ,          ^,          V^,          ^,          ,           V^,          ^,          ,           P                  4       # VP                  4       # rF  )lstrip_is_shorthand_colorupperr7   rD  codes   && r.   r=  )CSSToExcelConverter._convert_hex_to_excel  s`    ""3'##L11GaK$q'A+-Q!;BBDD::<r1   c                    V ^8  d   QhRRRR/# rC  r,   )r-   s   "r.   r/   rs     s     A A A Ar1   c                    VP                  R4      p\        V4      ^8X  d   R# \        V4      ^8X  d   R# \        RV 24      h)zSCheck if color code is shorthand.

#FFF is a shorthand as opposed to full #FFFFFF.
rG  TFzUnexpected color )rL  len
ValueErrorrO  s   && r.   rM  'CSSToExcelConverter._is_shorthand_color  sC    
 ""3't9>Y!^0?@@r1   )ry   rp   )
r   mediumDashDot
dashDotDotr   r   r   r   dashDotslantDashDotr   r3   )+r:   r;   r<   r=   __doc__r   r>  r   r  r  r8  rL   r   __annotations__r8   r   ru   r   rx   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r
  r   r<  r=  rM  r@   )r6   s   0r.   rX   rX   m   s   " L 	uE(H(xL 	$tttt%5uuuuuH" 	%$4J 	a11	J

E 	u
( %$A -K/*.0
O

7r(
-X#

$
4'"2 A A{	s   DrX   c                      ] tR tRtRtRtRtR R R lltR tR R lt	R	 R
 lt
R R ltR R ltR R ltR R lt]R R l4       tR R ltR R ltR R ltR!R R lltRtR# )"ExcelFormatteri  a  
Class for formatting a DataFrame to a list of ExcelCells,

Parameters
----------
df : DataFrame or Styler
na_rep: na representation
float_format : str, default None
    Format string for floating point numbers
cols : sequence, optional
    Columns to write
header : bool or sequence of str, default True
    Write out column names. If a list of string is given it is
    assumed to be aliases for the column names
index : bool, default True
    output row names (index)
index_label : str or sequence, default None
    Column label for index column(s) if desired. If None is given, and
    `header` and `index` are True, then the index names are used. A
    sequence should be given if the DataFrame uses MultiIndex.
merge_cells : bool or 'columns', default False
    Format MultiIndex column headers and Hierarchical Rows as merged cells
    if True. Merge MultiIndex column headers only if 'columns'.
    .. versionchanged:: 3.0.0
        Added the 'columns' option.
inf_rep : str, default `'inf'`
    representation for np.inf values (which aren't representable in Excel)
    A `'-'` sign will be added in front of -inf.
style_converter : callable, optional
    This translates Styler styles (CSS) into ExcelWriter styles.
    Defaults to ``CSSToExcelConverter()``.
    It should have signature css_declarations string -> excel style.
    This is only called for body cells.
autofilter : bool, default False
    If True, add automatic filters to all columns.
Nc               D    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRR
RR/# )r#   na_repr   float_formatrr   colszSequence[Hashable] | NoneheaderzSequence[Hashable] | boolindexr   index_labelzIndexLabel | Nonemerge_cellsr   inf_repstyle_converterrI   
autofilterr*   r+   r,   )r-   s   "r.   r/   ExcelFormatter.__annotate__  sz     0% 0% 0% !	0%
 (0% *0% 0% '0% +0% 0% )0% 0% 
0%r1   c                	*   ^ V n         W n        \        V\        4      '       gB   Wn        V P                  P                  4        VP                  pV
f   \        4       p
Wn        MRV n        RV n        Wn	        Ve   \        \        V4      P                  VP                  4      4      '       g   \        R4      h\        \        V4      P                  VP                  4      4      \        \        V4      4      8w  d   \        R4      hVP!                  VR7      V n	        V P                  P                  V n        W0n        W`n        Wpn        WPn        \        V\*        4      '       g   VR8w  d   \-        RV: R24      hWn        Wn        Wn        R# )    Nz,passes columns are not ALL present dataframez.Not all names specified in 'columns' are found)columnsrm  z!Unexpected value for merge_cells=.)
rowcounterr`  r   r   styler_computedatarX   rh  dfrT  r   intersectionrm  r?  setreindexra  rd  re  rc  r   rU  rf  rg  ri  )r7   rs  r`  ra  rb  rc  rd  re  rf  rg  rh  ri  s   &&&&&&&&&&&&r.   r8   ExcelFormatter.__init__  s7    "i((KKK  "B&"5"74C DK#'D uT{//

;<<MNN5;++BJJ78CD	NJOPPjjj.DGww(
&+t,,	1IA[N!DEE&$r1   c                	   \        V4      '       d*   \        P                  ! V4      '       d   V P                  pM\	        V4      '       d   \        P
                  ! V4      '       d   V P                  pMV\        P                  ! V4      '       d   R V P                   2pM*V P                  e   \        V P                  V,          4      p\        VRR4      e   \        R4      hV# )-Ntzinfoz{Excel does not support datetimes with timezones. Please ensure that datetimes are timezone unaware before writing to Excel.)r   r   isnar`  r   isposinf_scalarrg  isneginf_scalarra  r   getattrrU  r@  s   &&r.   _format_valueExcelFormatter._format_valueN  s    S>>gll3//++Cc]]&&s++ll((--$,,("".D--343$'3@ 
 
r1   c                   V ^8  d   QhRR/# r#   r*   Iterable[ExcelCell]r,   )r-   s   "r.   r/   rj  `  s     1 1#6 1r1   c              #  	  "   V P                   P                  ^8  d   V P                  '       g   \        R4      hV P                  '       g   V P
                  '       g   R# V P                   pV P                  R
9   pVP                  VRR7      p\        V4      p^ p^ pV P                  '       dR   \        V P                  P                  \        4      '       d(   V P                  P                  P                  ^,
          p\        VP                  4       F  w  rg\        VVVRR7      x  K  	  \        \        WAP                   VP"                  RR7      4       F  w  pw  rp
V	P%                  V
4      pVP'                  4        Fp  w  rRRrV'       d   V^8  d   YeV,           V,           r\)        VW\,           ^,           W,          R\+        V P,                  RR4      VVV P.                  VVR	7
      x  Kr  	  K  	  W`n        R# 5i)r*  z]Writing to Excel with MultiIndex columns and no index ('index'=False) is not yet implemented.NTFsparsifyinclude_names)r$   r&   r5   r6   strictctx_columns
r$   r&   r5   r6   rE   rF   rG   rH   r'   r)   >   Trm  )rm  nlevelsrd  NotImplementedError_has_aliasesrc  rf  _format_multir   r   rs  r   	enumeratenamesr!   ziplevelscodestakerN   rB   r~  rp  rh  ro  )r7   rm  merge_columns
level_strslevel_lengths	coloffsetlnumr  spansr  level_codesvaluesispan_valr'   r)   s   &               r.   _format_header_mi ExcelFormatter._format_header_mi`  s    <<!#:::)D 
 !!!T[[[,,((,==**MQV*W
)*5	:::*TWW]]J??--1I#GMM2JD	  3 3<~~w}}TJ3
.D.5+ [[-F${{}'+TH X\+/Q1I"!)	&t{{M4H "&"6"6)% 	  -	3
( s   -HHHF&Hc                   V ^8  d   QhRR/# r  r,   )r-   s   "r.   r/   rj    s      (; r1   c              #  	:  "   V P                   '       g   V P                  '       Edr   ^ pV P                  '       dV   ^p\        V P                  P                  \
        4      '       d*   \        V P                  P                  P                  4      pV P                  pV P                   '       d   \        \        V P                  4      V n        \        V P                  4      \        V P                  4      8w  d9   \        R\        V P                  4       R\        V P                  4       R24      hV P                  p\        V4       FI  w  r4\        V P                  W1,           VR\        V P                   RR4      ^ VV P"                  R7      x  KK  	  R# R# 5i)rl  zWriting z cols but got z aliasesNr  r$   r&   r5   r6   rE   rF   rG   rH   )r  rc  rd  r   rs  r   rT  r  rm  r
   r   rU  r  rB   ro  r~  rp  rh  )r7   r  colnamescolindexcolnames   &    r.   _format_header_regular%ExcelFormatter._format_header_regular  s4    Izzz	dggmmZ88 #DGGMM$7$7 8I||H   "8T[[9t{{#s4<<'88$"3t||#4"5 6##&t{{#3"4H>   ;;%.x%8!" ,&t{{M4H$"&"6"6	 	 &9% !,s   %FFA2F/C,Fc                   V ^8  d   QhRR/# r  r,   )r-   s   "r.   r/   rj    s     * * 3 *r1   c                	`  a  \        S P                  \        4      '       d   S P                  4       pMS P	                  4       pRpS P
                  P                  P                  '       d   S P
                  P                  P                   Uu. uF
  q3e   TMRNK  	  upR.\        S P                  4      ,          ,           p\        P                  ! R R V 4       4      '       d/   V 3R l\        V4       4       pS ;P                  ^,          un        \        P                  ! W4      # u upi )Nr)  c                    T ;'       d    T# r3   r,   )xys   &&r.   <lambda>/ExcelFormatter._format_header.<locals>.<lambda>  s    QWW1Wr1   c              3  *   "   T F	  qR 8g  x  K  	  R# 5i)r)  Nr,   ).0r  s   & r.   	<genexpr>0ExcelFormatter._format_header.<locals>.<genexpr>  s     6L1Bws   c              3  V   <"   T F  w  r\        SP                  WR 4      x  K   	  R # 5ir3   )r!   ro  )r  r  r5   r7   s   &  r.   r  r    s*      )7 dooxdCC)7s   &)r,   )r   rm  r   r  r  rs  rd  r  rT  rv   reducer  ro  	itertoolschain)r7   gengen2r  r$   s   f    r.   _format_headerExcelFormatter._format_header  s     dllJ//((*C--/C$&77==7;ww}}7J7JK7J!12-7JKODLL!O" "C  46L6LMM)23 1$s)) Ls   D+c                   V ^8  d   QhRR/# r  r,   )r-   s   "r.   r/   rj    s     / /1 /r1   c                	    \        V P                  P                  \        4      '       d   V P	                  4       # V P                  4       # r3   )r   rs  rd  r   _format_hierarchical_rows_format_regular_rowsr7   s   &r.   _format_bodyExcelFormatter._format_body  s5    dggmmZ001133,,..r1   c                   V ^8  d   QhRR/# r  r,   )r-   s   "r.   r/   rj    s     ,2 ,2&9 ,2r1   c              #  	  "   V P                   '       g   V P                  '       d   V ;P                  ^,          un        V P                  '       Ed   V P                  '       dO   \        V P                  \        \        \        P                  \        34      '       d   V P                  ^ ,          pMfV P                  '       d.   \        V P                  \        4      '       d   V P                  pM'V P                  P                  P                  ^ ,          p\        V P                  \        4      '       d   V ;P                  ^,          un        V'       d2   V P                  RJd"   \!        V P                  ^,
          ^ VR4      x  V P                  P                  p\        V P                  P                  \"        4      '       d%   V P                  P                  P%                  4       p\'        V4       FJ  w  r4\)        V P                  V,           ^ VR\+        V P,                  RR4      V^ V P.                  R7      x  KL  	  ^pM^ pV P1                  V4       Rj  xL
  R#  L5i)r*  FN	ctx_indexr  )r  rc  ro  rd  re  r   r   tuplenpndarrayr   r   rs  r  rm  r   r!   r   to_timestampr  rB   r~  rp  rh  _generate_body)r7   re  index_valuesidxidxvalr  s   &     r.   r  #ExcelFormatter._format_regular_rows  s    OOq O ::: J  4

E"B% % #..q1!!!j1A1A3&G&G".."ggmm11!4$,,
331$t{{%7! 3QTJJ  77==L$''--55#ww}}99;(6"#-&t{{KF"&"6"6	 	  7 II&&y111s1   $I*+I*I*%AI*BI*DI*!I("I*c                   V ^8  d   QhRR/# r  r,   )r-   s   "r.   r/   rj    s     V0 V0+> V0r1   c              #  	  "   V P                   '       g   V P                  '       d   V ;P                  ^,          un        ^ pV P                  '       Ed]   V P                  P                  P
                  pV P                  '       dG   \        V P                  \        \        \        P                  \        34      '       d   V P                  p\        V P                  \        4      '       d   V ;P                  ^,          un        \        P                   ! V!  '       dE   V P                  RJd5   \#        V4       F%  w  r4\%        V P                  ^,
          W4R4      x  K'  	  V P&                  '       Ed   V P&                  R8w  Edz   V P                  P                  P)                  RRR7      p\+        V4      p\-        VV P                  P                  P.                  V P                  P                  P0                  RR7       F  w  rxp	VP3                  V	VP4                  VP6                  R7      p
\        V
^ ,          \8        4      '       d   V
P;                  4       p
VP=                  4        F  w  rRRrV^8  d$   V P                  V,           V,           ^,
          pTp\?        V P                  V,           VW,          R\A        V PB                  RR4      VVV PD                  VVR	7
      x  K  	  V^,          pK  	  M\-        V P                  P                  R
R/  F  p\#        V4       Fq  w  pp\        V\8        4      '       d   VP;                  4       p\?        V P                  V,           VVR\A        V PB                  RR4      VVV PD                  R7      x  Ks  	  V^,          pK  	  V PG                  V4       Rj  xL
  R#  L5i)r*  FNrm  Tr  r  )
allow_fill
fill_valuer  r  r  r  )$r  rc  ro  rd  rs  r  re  r   r   r  r  r  r   rm  r   comany_not_noner  r!   rf  r  r   r  r  r  r  _can_hold_na	_na_valuer   r  rN   rB   r~  rp  rh  r  )r7   gcolidxindex_labelscidxr  r  r  r  r  r  r  r  r  r'   r)   indexcolvalsr  indexcolvals   &                 r.   r  (ExcelFormatter._format_hierarchical_rows  s    OOq O:::77==..LJ  4

E"B% %  $//
 $,,
331$ ..4;;e3K"+L"9JD#DOOa$7TJJ #: D$4$4	$A!WW]]88! 9 
 !2* =25!GGMM((GGMM'' 	3.E; $[[##)#6#6#)#3#3 ) F "&)V44!'!4!4!6',{{}/3TH#a<)-1)<x)G!)KJ'.H* $! 3 ' &	"&'.t{{K'N$%$+*.*>*>'1%-  (5" qLGA3H %($Dt$DL,5l,C([%k6::*5*B*B*DK* $# 5 ' +"&'.t{{K'N$'$+*.*>*>	 	 -D qLG! %E$ &&w///s1   $O-O1OBO AO7IOOOc                   V ^8  d   QhRR/# )r#   r*   r   r,   )r-   s   "r.   r/   rj  U  s     ) )d )r1   c                ,    \        V P                  4      # )z1Whether the aliases for column names are present.)r   rc  r  s   &r.   r  ExcelFormatter._has_aliasesT  s     DKK((r1   c                    V ^8  d   QhRRRR/# )r#   r  r%   r*   r  r,   )r-   s   "r.   r/   rj  Y  s       0C r1   c              #  	T  "   \        \        V P                  4      4       F  pV P                  P                  R V3,          p\        V4       FP  w  rE\        V P                  V,           W!,           VR\        V P                  RR4      VVV P                  R7      x  KR  	  K  	  R# 5i):NNNNctxr  )rangerT  rm  rs  ilocr  rB   ro  r~  rp  rh  )r7   r  colidxseriesr  r5   s   &&    r.   r  ExcelFormatter._generate_bodyY  s     C-.FWW\\!V),F#F+"!+*&t{{E4@""&"6"6	 	 , /s   B&B(c                   V ^8  d   QhRR/# r  r,   )r-   s   "r.   r/   rj  i  s      %8 r1   c              #  	   "   \         P                  ! V P                  4       V P                  4       4       F'  pV P	                  VP
                  4      Vn        Vx  K)  	  R # 5ir3   )r  r  r  r  r  r5   )r7   cells   & r.   get_formatted_cells"ExcelFormatter.get_formatted_cellsi  sH     OOD$7$7$94;L;L;NOD))$((3DHJ Ps   A!A#c                    V ^8  d   QhRRRR/# )r#   rd  r%   r*   r   r,   )r-   s   "r.   r/   rj  n  s        r1   c                    V^ 8  d   \        RV 24      hRpV^ 8  g	   V'       g*   \        V^4      w  r\        ^AV,           4      V,           pK8  V# )a  
Convert 0-based column index to Excel column name.

Parameters
----------
index : int
    The numeric column index to convert to an Excel column name.

Returns
-------
column_name : str
    The column name corresponding to the index.

Raises
------
ValueError
    Index is negative
zIndex cannot be negative: r)  )rU  divmodchr)r7   rd  column_name	remainders   &&  r.   
_num2excelExcelFormatter._num2exceln  sT    & 199%ABBai{%eR0Eb9n-;Kr1   c               <    V ^8  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r#   writerz)FilePath | WriteExcelBuffer | ExcelWriter
sheet_namer   startrowr%   startcolfreeze_panesztuple[int, int] | Noneenginerr   storage_optionszStorageOptions | Noneengine_kwargsrD   r*   r+   r,   )r-   s   "r.   r/   rj    so     u u9u u 	u
 u -u u /u #u 
ur1   c	           
        ^ RI Hp	 V P                  P                  w  rWP                  8  g   WP
                  8  d,   \        RV
 RV RV P                   RV P
                   24      hV P                  '       EdX   ^p^pV^ 8X  d   ^ pMV P                  '       d   ^ p\        V P                  P                  \        4      '       dE   V P                  '       d   \        R4      hV P                  P                  P                  ^,
          p\        V P                  \        4      '       dQ   V P                  '       d   \        R4      hV P                  P                  pV P                  P                  ^,           pMRpV P                  V4       W<,            2pV P                  WK,           V,           4      pV W:,           V,            2pV RV 2pMRpVf   / pV P                  4       p\        W4      '       d   RpMV	! VVVVR	7      pR
p VP!                  VVVVVVR7       V'       d   VP#                  4        R# R#   T'       d   TP#                  4        i i ; i)a  
writer : path-like, file-like, or ExcelWriter object
    File path or existing ExcelWriter
sheet_name : str, default 'Sheet1'
    Name of sheet which will contain DataFrame
startrow :
    upper left cell row to dump data frame
startcol :
    upper left cell column to dump data frame
freeze_panes : tuple of integer (length 2), default None
    Specifies the one-based bottommost row and rightmost column that
    is to be frozen
engine : string, default None
    write engine to use if writer is a path - you can also set this
    via the options ``io.excel.xlsx.writer``,
    or ``io.excel.xlsm.writer``.

storage_options : dict, optional
    Extra options that make sense for a particular storage connection, e.g.
    host, port, username, password, etc. For HTTP(S) URLs the key-value pairs
    are forwarded to ``urllib.request.Request`` as header options. For other
    URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are
    forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more
    details, and for more examples on storage options refer `here
    <https://pandas.pydata.org/docs/user_guide/io.html?
    highlight=storage_options#reading-writing-remote-files>`_.

engine_kwargs: dict, optional
    Arbitrary keyword arguments passed to excel engine.
r   z-This sheet is too large! Your sheet size is: z, z Max sheet size is: zwExcel filters merged cells by showing only the first row. 'autofilter' and 'merge_cells' cannot be used simultaneously.:NF)r  r  r  T)r  r  r  autofilter_ranger-  )pandas.io.excelr   rs  shapemax_rowsmax_colsrU  ri  rd  r   r   rf  r  rm  r  r  _write_cellsclose)r7   r  r  r  r  r  r  r  r  r   num_rowsnum_colsstartrowsoffsetendrowsoffsetindexoffsetstartautofilter_end_columnendr  formatted_cells	need_saves   &&&&&&&&&            r.   writeExcelFormatter.write  s3   R 	0!WW]]mm#x--'??zH: V&&*mm_Bt}}oG 
 ???OM1}dggmmZ88'''(6  '+ggmm&;&;a&?dllJ77'''(6  +/,,*>*>(,(<(<q(@ !x01(2L1MNE$(OOH4G+4U$V!*+H,?-,O+PQC"'#/# M224f**I  /+	F I	!!)!1     y s   I I)ri  rm  rs  ra  rc  rd  re  rg  rf  r`  ro  rh  rp  i   i @  )
r)  NNTTNFinfNF)Sheet1rl  rl  NNNN)r:   r;   r<   r=   r[  r  r  r8   r  r  r  r  r  r  r  propertyr  r  r  r  r  r@   r,   r1   r.   r^  r^    sp    #J HH0%d$1f>*,/,2\V0p ) ) 
8u ur1   r^  )8r[  
__future__r   collections.abcr   r   r   r   r   rv   r  r$  typingr   r	   r
   r   numpyr  pandas._libs.libr   pandas.util._exceptionsr   pandas.core.dtypesr   pandas.core.dtypes.commonr   r   pandasr   r   r   r   r   pandas.core.commoncorecommonr  pandas.io.formats._color_datar   pandas.io.formats.cssr   r   pandas.io.formats.formatr   pandas._typingr   r   r   r   r   r   r!   rB   rX   r^  r,   r1   r.   <module>r'     s    #    	 
   ) 4 &
  !   5 7  #! !*K9 K2CA CALL Lr1   