+
    xȇi                        ^ RI Ht ^ RIHt ^ RIt^ RIt]'       d   ^ RIH	t	 ^ RI
Ht  ! R R4      tR R	 lt]R
8X  d
   ]! 4        R# R# )    )annotations)TYPE_CHECKINGN)Iterable)Figurec                  n    ] tR t^tRtRR R lltR R ltR R ltRR R	 lltR
 t	R t
RR R lltRtR# )TablePlotterz[
Layout some DataFrames in vertical/horizontal layout for explanation.
Used in merging.rst
c               (    V ^8  d   QhRRRRRRRR/# )   
cell_widthfloatcell_height	font_sizereturnNone )formats   "e/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/util/_doctools.py__annotate__TablePlotter.__annotate__   s2     # ## # 	#
 
#    c                	*    Wn         W n        W0n        R # N)r   r   r   )selfr   r   r   s   &&&&r   __init__TablePlotter.__init__   s     %&"r   c                    V ^8  d   QhRRRR/# )r
   dfzpd.DataFramer   tuple[int, int]r   )r   s   "r   r   r      s     @ @ @/ @r   c                    VP                   w  r#W!P                  P                  ,           W1P                  P                  ,           3# )z1
Calculate table shape considering index levels.
)shapecolumnsnlevelsindex)r   r   rowcols   &&  r   _shapeTablePlotter._shape   s4     88ZZ'''xx/?/?)???r   c                   V ^8  d   QhRR/# )r
   r   r   r   )r   s   "r   r   r   &   s      ? r   c                >  a  V'       dk   \        \        V 3R lV 4       4      S P                  V4      ^ ,          4      p\        V 3R lV 4       4      S P                  V4      ^,          ,           pWT3# \        V Uu. uF  pS P                  V4      ^ ,          NK  	  upS P                  V4      ^ ,          .,           4      p\        V Uu. uF  pS P                  V4      ^,          NK  	  upS P                  V4      ^,          .,           4      pWT3# u upi u upi )zA
Calculate appropriate figure size based on left and right data.
c              3  T   <"   T F  pSP                  V4      ^ ,          x  K  	  R# 5ir   Nr&   .0r   r   s   & r   	<genexpr>*TablePlotter._get_cells.<locals>.<genexpr>,   s!     ?$BT[[_Q//$   %(c              3  T   <"   T F  pSP                  V4      ^,          x  K  	  R# 5i   Nr,   r-   s   & r   r/   r0   -   s!     ;dR++dr1   )maxsumr&   )r   leftrightverticalvcellshcellsr   s   f&&&   r   
_get_cellsTablePlotter._get_cells&   s     ?$??UASTUAVWF;d;;dkk%>PQR>SSF ~ t<t$++b/!,,t<E@RST@U?VVWFt<t$++b/!,,t<E@RST@U?VVWF~ =<s   =!D!Dc               $    V ^8  d   QhRRRRRR/# )r
   labelszIterable[str]r9   boolr   r   r   )r   s   "r   r   r   3   s$     ; ;#0;AE;	;r   c           	       a  ^ RI Hp ^ RIHp \	        V\
        4      '       g   V.pV Uu. uF  pS P                  V4      NK  	  ppS P                  V4      pS P                  WV4      w  rV'       d(   S P                  V,          S P                  V	,          3p
M&S P                  V,          S P                  V	,          3p
VP                  V
R7      pV'       d   VP                  \        V4      V4      p\        V 3R lV 4       4      p\        V 3R lV 4       4      p\        \        WRR7      4       F@  w  pw  ppVP!                  W^ V13,          4      pS P#                  VVVRV,          R	7       KB  	  VP%                  VR
VR13,          4      pS P#                  VVRRV	,          R	7       VP'                  RRRRR7       V# \        V 3R l. VOVN 4       4      pR\(        P                  ! V4      ,          pVP                  ^V4      p^ p\        WRR7       Fe  w  ppS P+                  V4      pVP!                  V^ WV^,          ,           13,          4      pS P#                  VVVVR	7       VV^,          ,          pKg  	  VP%                  V^ VR13,          4      pS P#                  VVRVR	7       VP'                  RRRRR7       V# u upi )aE  
Plot left / right DataFrames in specified layout.

Parameters
----------
left : list of DataFrames before operation is applied
right : DataFrame of operation result
labels : list of str to be drawn as titles of left DataFrames
vertical : bool, default True
    If True, use vertical layout. If False, use horizontal layout.
)gridspecN)figsizec              3  T   <"   T F  pSP                  V4      ^,          x  K  	  R# 5ir3   r,   r-   s   & r   r/   $TablePlotter.plot.<locals>.<genexpr>U   !     BTrB 2 2Tr1   c              3  T   <"   T F  pSP                  V4      ^ ,          x  K  	  R# 5ir+   r,   r-   s   & r   r/   rE   V   rF   r1   T)strict      ?)titleheight:NNNResultg?g?g?gffffff?)topbottomr7   r8   c              3  T   <"   T F  pSP                  V4      ^ ,          x  K  	  R# 5ir+   r,   r-   s   & r   r/   rE   _   s!     G"4;;r?1--r1   g333333?)
matplotlibrB   matplotlib.pyplotpyplot
isinstancelist_convr<   r   r   figureGridSpeclenr5   	enumeratezipadd_subplot_make_tablesubplotsubplots_adjustnpr&   )r   r7   r8   r?   r9   rB   pltr   r;   r:   rC   figgsmax_left_colsmax_left_rowsi_left_labelaxmax_rowsrK   sps   f&&&&                 r   plotTablePlotter.plot3   s    	('$%%6D)-.2

2.

5!h?oo.0@0@60IIG oo.0@0@60IIGjjj)""3t9f5BBTBBMBTBBM&/D0N&O"?E6__R1]?(:%;<  U&}AT U 'P R=> 123BRhtf}MC4tL" 
 G$GGH266(++F""1f-BA!$t<
F[[___R12a5y=(8%9:  Rvf ERU
	 = R12Y'BRhvFDDM
Q /s   Kc                    \        V\        P                  4      '       d2   VP                  f   VP	                  RR7      pMVP	                  4       pVP                  R4      pV# )z6
Convert each input to appropriate for table outplot.
 )nameNaN)rS   pdSeriesro   to_framefillna)r   datas   &&r   rU   TablePlotter._convp   sM     dBII&&yy }}"}-}}{{5!r   c                	   VP                  4       pVP                  P                  pV^8X  d   VP                  ^ RVP                  4       MA\	        V4       F2  pVP                  VRV 2VP                  P                  V4      4       K4  	  VP                  P                  pV^8  d   VP                  P                  ^ 4      p\	        ^V4       Uu. uF'  q1P                  P                  V4      P                  NK)  	  pp\        P                  ! V4      pVP                  Vn        \        P                  ! Wq.4      pWQn        V# u upi )r4   Index)copyr#   r"   insertrange_get_level_valuesr!   _valuesrq   	DataFrameconcat)r   ru   idx_nlevelsre   col_nlevelsr%   valuescol_dfs   &&      r   _insert_indexTablePlotter._insert_index|   s	   yy{jj((!KK7DJJ/;'Aqc{DJJ,H,H,KL ( ll**?,,003CCHKCXCXa..q199CX   \\&)F!>>DL99f^,DLs   -ENc               $    V ^8  d   QhRRRRRR/# )r
   rJ   strrK   zfloat | Noner   r   r   )r   s   "r   r   r      s!       l d r   c                	   Vf   VP                  R4       R # ^ RIHp VP                  P                  pVP
                  P                  pV P                  V4      pVP                  W^	R7      pVP                  V P                  4       Vf   R\        V4      ^,           ,          pVP                  4       p	V	R,          P                  4        Fm  w  w  rpVR	8X  d   VP                  R4       M;W8  d   W8  d   VP                  R4       MW8  g   W8  d   VP                  R4       VP                  V4       Ko  	  VP                  W0P                  R7       VP!                  R4       R # )
NF)plotting)locrI   celldz#AAAAAA)sizeoff)set_visiblepandasr   r#   r"   r!   r   tableset_fontsizer   rX   
propertiesitemsset_facecolor
set_height	set_titleaxis)r   rh   r   rJ   rK   r   r   r   tbpropsrccells   &&&&&        r   r\   TablePlotter._make_table   s   :NN5!#hh&&jj((#^^B^*
'>CGaK(F!'N002LFQDBw  'Q_  'AO""9-OOF# 3 	U0
r   )r   r   r   )gGz?g      ?g      @)r   Tr   )__name__
__module____qualname____firstlineno____doc__r   r&   r<   rk   rU   r   r\   __static_attributes__r   r   r   r   r      s1    
#@;z
, r   r   c                   V ^8  d   QhRR/# )r
   r   r   r   )r   s   "r   r   r      s      d r   c            	        ^ RI Hp  \        4       p\        P                  ! R. ROR. ROR. RO/4      p\        P                  ! R^
^.R^^ ./4      pVP                  W#.\        P                  ! W#.4      RR.RR7       V P                  4        \        P                  ! R	^
^.R
^^ ./4      pVP                  W$.\        P                  ! W$.^R7      RR.RR7       V P                  4        \        P                  P                  . RO4      p\        P                  P                  RR.4      p\        P                  ! R. ROR. RO/VR7      pWdn
        VP                  WDR.R7       V P                  4        R# )r   NABCdf1df2T)r?   r9   XZ)r   Fv1v2)r#   df3)r?   )
         )         )          r4   r   r4   r   )r   r   )r4   r   )r
   r   )r
   r   )r
   r   )r4   r
               )r   r         	   r   )rQ   rR   r   rq   r~   rk   r   show
MultiIndexfrom_tuplesr!   )r`   pr   r   r   idxcolumns          r   mainr      s:   #A
,,\3c<P
QC
,,b"XsRH5
6CFFC:ryy#,eU^dFSHHJ
,,b"XsRH5
6CFF	
BIIsjq15%.SX   HHJ
--
#
#DC ]]&&(';<F
,,0$8KLTW
XCKFF3UGF$HHJr   __main__)
__future__r   typingr   numpyr_   r   rq   collections.abcr   matplotlib.figurer   r   r   r   r   r   r   <module>r      s@    "    ((_ _D8 zF r   