1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
U
­ý°d6tã@sXddlmZddlmZddlZddlZddlZddlZddlm    Z    m
Z
m Z m Z ddl mZddlmmmZdZdd„Zejdd    gd
d d „ƒZejejd
d d„ƒZej dddg¡dd„ƒZdd„Zdd„Zdd„Zej de    de  d¡iƒdfe    ddgiƒdfg¡d d!„ƒZ!d"d#„Z"d$d%„Z#ej d&id'd(fd)d*id+d,fg¡d-d.„ƒZ$ej d/d0d*g¡d1d2„ƒZ%ej d3d4d5d6d7g¡d8d9„ƒZ&ej d:d;d<g¡d=d>„ƒZ'ej d?e    dd@gdAdBgdCdDgdEdFggdGdge  dC¡dHdIdJdK„idLfe    dMedNd@d@ƒedNdAdAƒgiƒdMdOdK„idPfe    dQej(dRdSgdTdUiƒdQdVdK„idWfe    ej)d@dAgdXdYej)d@dAgdZdYej)d@dAgd[dYej)d@dAgd\dYej)d0d*gd]dYej)d^d_ge *d^d_g¡dYej)d@d`ge+dYdaœƒdbdK„gdFdcfg¡ddde„ƒZ,dfdg„Z-dhdi„Z.ej djd@dDg¡dkdl„ƒZ/dmdn„Z0ej dodpdqg¡drds„ƒZ1ej dtddudK„dvfddwdK„d`fdAdxdK„d`fdAdydK„d`fg¡dzd{„ƒZ2ejjd dgd0d|d}d~„ƒZ3ejjd d    gd0d|dd€„ƒZ4dd‚„Z5dƒd„„Z6d…d†„Z7ej d‡e j8e9e:e  dA¡ ;dA¡e <e=dCƒdA¡ƒƒdˆd‰gdŠd‹dŒfe  8e9e:e=dCƒe <e=dCƒdA¡ƒƒ¡ddŽfg¡dd„ƒZ>d‘d’„Z?ej dd“d”d•d–d—g¡d˜d™„ƒZ@Gdšd›„d›ƒZAej dœddždŸgg¡d d¡„ƒZBd¢d£„ZCd¤d¥„ZDd¦d§„ZEej d¨d0d*g¡ej d©d0d*g¡ej dªd0d*g¡ej d«e
dd@gƒd¬fe
dd@gd­d®d¯fe  Fd^gd_d°gg¡d±fe jFd^gd_d°ggd²d³gdŠd´fg¡ej dµe
dd@gƒd¬fe
dd@gd¶d®d¯fe  Fd^gd_d°gg¡d±fe jFd^gd_d°ggd·d¸gdŠd´fg¡d¹dº„ƒƒƒƒƒZGej d¨d0d*g¡ej d©d0d*g¡ej dªd0d*g¡ej d«e
e  d»¡ƒd¬fe
e  d»¡d­d®d¯fe  Fd^d_gd°d¼gd½d¾gg¡d±fe jFd^d_gd°d¼gd½d¾ggdGdd¿gdŠd´fg¡ej dµe
e  d»¡ƒd¬fe
e  d»¡d¶d®d¯fe  Fd^d_gd°d¼gd½d¾gg¡d±fe jFd^d_gd°d¼gd½d¾ggdGdd¿gdŠd´fg¡dÀdÁ„ƒƒƒƒƒZHej dªd*dg¡dÂdăZIej dªd*dg¡ej dÄdÅdÆg¡dÇdȄƒƒZJej dÉd0d*g¡dÊd˄ƒZKdÌd̈́ZLdÎdτZMej dÐdÑdÒg¡dÓdԄƒZNej dÕdÖd×g¡dØdلƒZOej dÚdÛdÜdK„fdÝdÞdK„fg¡ej dßdàdáddâg¡dãd䄃ƒZPej dœd0dg¡dåd愃ZQdçdè„ZRej dédêdëdìdíg¡dîdZSdðdñ„ZTej dòdódôdõdög¡d÷dø„ƒZUdùdú„ZVej dûdüdýg¡dþdÿ„ƒZWdd„ZXdd„ZYdS(é)Údatetime)ÚStringION)Ú    DataFrameÚIndexÚ
MultiIndexÚoption_contexta½Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.c    CsFd |dg¡}|dddd|ƒ}t|dd}| ¡}W5QRX| ¡S)a.
    Read HTML file from formats data directory.
 
    Parameters
    ----------
    datapath : pytest fixture
        The datapath fixture injected into a test by pytest.
    name : str
        The name of the HTML file without the suffix.
 
    Returns
    -------
    str : contents of HTML file.
    Ú.ÚhtmlÚioÚformatsÚdatazutf-8©Úencoding)ÚjoinÚopenÚreadÚrstrip)ÚdatapathÚnameÚfilenameÚfilepathÚfr    ©rú[d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/io/formats/test_to_html.pyÚ expected_htmls
rÚmixedÚempty)ÚparamscCs~|jdkr\ttj d¡t d¡dœt d¡d}tj|j    dd…df<tj|j    dd…df<|S|jd    krztt d¡d}|SdS)
z8Fixture for a big mixed Dataframe and an empty DataframeréÈ)ÚAÚB©ÚindexNérr r)
ÚparamrÚnpÚrandomÚrandnÚtmZmakeStringIndexÚarangeÚnanÚloc)ÚrequestÚdfrrrÚbiggie_df_fixture4s
þ
r.cCs|jS©N)r$)r,rrrÚjustifyDsr0Ú    col_spaceéé2cCslttjjddƒ}|j|d}dd„| d¡Dƒ}t|ƒdksBt‚|D] }d|ksVt‚t|ƒ|ksFt‚qFdS)    N©éé©Úsize©r1cSsg|]}t d|¡r|‘qS©z<th[>\s]©ÚreÚsearch©Ú.0ÚxrrrÚ
<listcomp>Os z/test_to_html_with_col_space.<locals>.<listcomp>z\nrz    min-width)rr%r&Úto_htmlÚsplitÚlenÚAssertionErrorÚstr)r1r-ÚresultÚhdrsÚhrrrÚtest_to_html_with_col_spaceIs  rJc    Cs®ttjjdddddgd}d}tjt|d|jd    d
gd W5QRXtjt|d|jd    d
d d gd W5QRXd}tjt|d|jddddœd W5QRXdS)N©r6r6r7ÚaÚbÚc©ÚcolumnszGCol_space length\(\d+\) should match DataFrame number of columns\(\d+\)©Úmatchr2é(r9r3é<zunknown columnÚfooéé")rLrMÚd)rr%r&ÚpytestÚraisesÚ
ValueErrorrB)r-ÚmsgrrrÚ2test_to_html_with_column_specific_col_space_raisesVsÿr]cCsÌttjjdddddgd}|jddd    œd
}d d „| d ¡Dƒ}d|dksRt‚d|dksbt‚d|dksrt‚|jdddgd
}dd „| d ¡Dƒ}d|dks¨t‚d|dks¸t‚d|dksÈt‚dS)NrKr7rLrMrNrOZ2emrV©rLrMr9cSsg|]}t d|¡r|‘qSr:r;r>rrrrAls z?test_to_html_with_column_specific_col_space.<locals>.<listcomp>Ú
zmin-width: 2em;">a</th>r5zmin-width: 23px;">b</th>éz
<th>c</th>r6Z1emcSsg|]}t d|¡r|‘qSr:r;r>rrrrArs zmin-width: 1em;">a</th>zmin-width: 2px;">b</th>zmin-width: 3px;">c</th>)rr%r&rBrCrE)r-rGrHrrrÚ+test_to_html_with_column_specific_col_spacehsracCsBddgddgddgdœ}t|ƒ ddg¡}| ¡}d    |ks>t‚dS)
NrLrMÚr5r`)Úc1Úc2r rcrdZrowspan)rZ    set_indexrBrE)r r-rGrrrÚ$test_to_html_with_empty_string_labelxsrez df,expecteduσg$@Z    unicode_1rZ    unicode_2cCs"t||ƒ}| ¡}||kst‚dSr/©rrBrE)r-ÚexpectedrrGrrrÚtest_to_html_unicode€s
rhc    CsJ|d}|j|ddtt|ƒdd}| ¡| ¡ks<t‚W5QRXdS)Nú    test.htmlÚgbkr )rBrrFrrE)Ú float_frameZtmp_pathÚpathrrrrÚtest_to_html_encodingsrmcCs8tddddgiƒ}|jdd}t|dƒ}||ks4t‚dS)Nrg@gÍÌÌÌÌÌ@gš™™™™™@ú,)ÚdecimalZgh12031_expected_output©rrBrrE©rr-rGrgrrrÚtest_to_html_decimal•s 
rrzkwargs,string,expectedz <type 'str'>ÚescapedÚescapeFz <b>bold</b>Zescape_disabledcCsLd}d}||||i||||idœ}t|ƒjf|Ž}t||ƒ}||ksHt‚dS)Nzstr<ing1 &amp;zstri>ng2 &amp;)zco<l1zco>l2rp)ÚkwargsÚstringrgrrLrMZ    test_dictrGrrrÚtest_to_html_escapeds 
rwÚindex_is_namedTcCs|ttdƒtddƒtddƒtddƒdœƒ}t ddgdd    gg¡|_|rVt|jjd
d |_|jd d }t    |dƒ}||ksxt
‚dS)Nr`r6éé©rLrMrNrXrLrMrNrXÚidx©rFr!Zgh8452_expected_output) rÚrangerÚ from_productrPrr"ÚvaluesrBrrE)rxrr-rGrgrrrÚ#test_to_html_multiindex_index_false®s"ÿ 
rzmulti_sparse,expected)FZ(multiindex_sparsify_false_multi_sparse_1)FZ(multiindex_sparsify_false_multi_sparse_2)TZmultiindex_sparsify_1)TZmultiindex_sparsify_2c    Csœtjddddgddddggddgd}tddgddgddgd    d
gg|d }| d ¡rd|ddd…|_td |ƒ| ¡}W5QRXt||ƒ}||ks˜t‚dS)Nrr5rU©Únamesr`r6éryérzr!Ú2zdisplay.multi_sparse)    rZ from_arraysrÚendswithrPrrBrrE)Z multi_sparsergrr"r-rGrrrÚ test_to_html_multiindex_sparsify¼s
&$
 
rˆzmax_rows,expected)rTZgh14882_expected_output_1)é8Zgh14882_expected_output_2c
Csrtjdddgdddgddd    d
d d d ggdddgd}tdtt|ƒƒi|d}|j|d}t||ƒ}||ksnt‚dS)Nédri,é
r#r2r5r`r6r„ryr…rzrLrMrNr‚Únr!)Úmax_rows)rrrr~rDrBrrE)rrgrr"r-rGrrrÚ)test_to_html_multiindex_odd_even_truncateÐs
"ÿ 
rŽzdf,formatters,expectedr5r`r6r„ryr…rzrU©rPr"Ú    __index__cCsd|S)NÚabcdr©r@rrrÚ<lambda>ìór“Zindex_formatterÚmonthsiàcCs
| d¡S)Nz%Y-%m©Ústrftimer’rrrr“ñr”Zdatetime64_monthformatterZhodz 10:10:10.100z 12:12:12.120z %H:%M:%S.%f)ÚformatcCs
| d¡S)Nz%H:%Mr–r’rrrr“ür”Zdatetime64_hourformatterÚint64©ZdtypeÚfloat64ZInt64rvÚbooleanrLrMr†)ÚirÚIÚsrMrNÚocCsdS)NÚ    formattedrr’rrrr“ r”Zvarious_dtypes_formattedcCs&t||ƒ}|j|d}||ks"t‚dS)N©Ú
formattersrf)r-r£rgrrGrrrÚtest_to_html_formattersãs.
 r¤cCsPtdddddgdddddgtj d¡tj d¡dœƒ}|jdgdgd     ¡dS)
NrLrMZ1eru2èmery)õclé1õclé2u    données1u    données2r¥r¦©r"rP)rr%r&r'Z pivot_tableÚ _repr_html_©r-rrrÚtest_to_html_regression_GH6098s  
 
üÿ
rªcCsHtjdddd}t|tdƒd}|jddd}t|d    ƒ}||ksDt‚dS)
NZ20010101ÚDr#)ÚstartÚfreqZperiodsr§ér„)rÚmax_colsÚtruncate)ÚpdZ
date_rangerr~rBrrE)rr"r-rGrgrrrÚtest_to_html_truncate$s
 
r²r8c    CsRtdddgd}d}tjtt | |¡¡d|jdjg|dW5QRXdS)    NrLrMrNrOzAFormatters length({}) should match DataFrame number of columns(3)rQz{}r¢)rrYrZr[r<rtr˜rB)r8r-r\rrrÚ'test_html_invalid_formatters_arg_raises,sr³cCsxdddddœdddd    dœd
d d d dœdddddœg}t|ƒ}dd„}||ddg}|j|dd}t|dƒ}||kstt‚dS)Nr5r`r6r„)rr ÚCr«ryr…rzr®é    r‹é é é ééécSs t|ƒdS)NZ_mod)rFr’rrrr“?r”z1test_to_html_truncate_formatter.<locals>.<lambda>)r£r¯Ztruncate_formatterrp)rr r-Úfmtr£rGrgrrrÚtest_to_html_truncate_formatter5s    ü 
r½zsparsify,expected)TZtruncate_multi_index)FZtruncate_multi_index_sparse_offc    Cs^ddddddddgddddddddgg}t||d}|jdd|d    }t||ƒ}||ksZt‚dS)
NÚbarÚbazrUZquxÚoneÚtwor§rz)rr¯Úsparsifyrp)rÂrgrZarraysr-rGrrrÚ!test_to_html_truncate_multi_indexFsþ 
rÃzoption,result,expectedcCs| ¡Sr/©rBr©rrrr“Xr”Ú1cCs |jddS)Nr`)ZborderrÄr©rrrr“Yr”cCs| ¡Sr/rÄr©rrrr“Zr”cCs| ¡Sr/)r¨r©rrrr“[r”c    Cs\tdddgiƒ}|dkr"||ƒ}ntd|ƒ||ƒ}W5QRXd|›d}||ksXt‚dS)Nrr5r`zdisplay.html.borderzborder="ú")rrrE)ÚoptionrGrgr-rrrÚtest_to_html_borderUs
 
  rÈ)ZindirectcCsž|}| ¡}tƒ}|j|d}|dks*t‚| ¡|ks:t‚t|tƒsHt‚|jddgdd|jddgddd„id|jddgtd    |jddgd
td dS) N)Úbufr ré)rPr1cSs|d›S)Nz.1frr’rrrr“wr”ztest_to_html.<locals>.<lambda>)rPr£)rPÚ float_formatr·)rPr1rË)rBrrEÚgetvalueÚ
isinstancerF)r.r-rŸrÉÚretvalrrrÚ test_to_htmlis  rÏcCs|}| ¡dSr/rÄ)r.r-rrrÚtest_to_html_empty_dataframe}srÐcCs8|}| ¡}| d¡}| |¡| ¡}||ks4t‚dS)Nri)rBrrrE)r.Ztmpdirr-rgrlrGrrrÚtest_to_html_filenameƒs 
 
rÑcCs>tdtj d¡iƒ}|jdd}|| d¡}d|ks:t‚dS)Nr@ryF)Z    bold_rowsz</thead>z<strong)rr%r&r'rBÚfindrE)r-r    rGrrrÚtest_to_html_with_no_boldŒs rÓcCs|jdgd}d|kst‚dS)NrrOz
<th>B</th>)rBrE)rkrGrrrÚtest_to_html_columns_arg“srÔzcolumns,justify,expectedZCL0ZCL1r‚ÚleftZ multiindex_1ÚrightZ multiindex_2cCs>ttdƒtdƒg|d}|j|d}t||ƒ}||ks:t‚dS)Nr‘ZefghrO©r0)rÚlistrBrrE)rPr0rgrr-rGrrrÚtest_to_html_multiindex˜s 
rÙcCsZtdddgdddgdddgdœd    d
d gd }|j|d }t|dƒj|d }||ksVt‚dS)Nr…i0ur`r5ipiÒhr©rr r´rr r´rOr×r0)rrBrr˜rE)r0rr-rGrgrrrÚtest_to_html_justify±sþ rÛz super-rightz
small-leftZ    noinheritZtinyÚpandasc    Cs4tƒ}d}tjt|d|j|dW5QRXdS)Nz#Invalid value for justify parameterrQr×)rrYrZr[rB)r0r-r\rrrÚtest_to_html_invalid_justify»srÝc@sHeZdZejdd„ƒZejdd„ƒZdd„Zdd„Zd    d
„Z    d d „Z
d S)Ú TestHTMLIndexcCs>dddg}tdddgddd    gd
d tjgd œd ddg|d}|S)NrUr¾r¿r5r`r6g333333ó?g333333 @gffffff@rÀrÁrÚrr r´r)rr%r*)Úselfr"r-rrrr-Ès
ýzTestHTMLIndex.dfcCs
t|dƒS)NZindex_2)r)rßrrrrÚexpected_without_indexÒsz$TestHTMLIndex.expected_without_indexcCsNt|dƒ}| ¡|kst‚|jdd}|jD]}||ks,t‚q,||ksJt‚dS)NZindex_1Fr!)rrBrEr")rßrr-ràÚexpected_with_indexrGrrrrÚ$test_to_html_flat_index_without_nameÖs 
 
z2TestHTMLIndex.test_to_html_flat_index_without_namecCsFtdddgdd|_t|dƒ}| ¡|ks.t‚|jdd|ksBt‚dS)    NrUr¾r¿r|r}Zindex_3Fr!)rr"rrBrE)rßrr-ràrárrrÚ!test_to_html_flat_index_with_nameás
z/TestHTMLIndex.test_to_html_flat_index_with_namecCsbdddg}t |¡|_t|dƒ}| ¡|ks0t‚|jdd}dD]}||ks@t‚q@||ks^t‚dS)N©rUÚcar©rUÚbike©r¾råZindex_4Fr!)rUr¾rårç©rÚ from_tuplesr"rrBrE)rßrr-ràÚtuplesrárGrrrrÚ%test_to_html_multiindex_without_namesçs
 
 z3TestHTMLIndex.test_to_html_multiindex_without_namescCsPdddg}tj|ddgd|_t|dƒ}| ¡|ks8t‚|jdd    |ksLt‚dS)
NrärærèZidx1Zidx2r‚Zindex_5Fr!ré)rßrr-ràrërárrrÚ"test_to_html_multiindex_with_namesös
 
 
z0TestHTMLIndex.test_to_html_multiindex_with_namesN) Ú__name__Ú
__module__Ú __qualname__rYÚfixturer-ràrârãrìrírrrrrÞÇs
    
 rÞÚclasseszsortable draggableZsortableZ    draggablecCs,tƒ}t|dƒ}|j|d}||ks(t‚dS)NZ with_classes©rò©rrrBrE)ròrr-rgrGrrrÚtest_to_html_with_classesþs
 rõcCs<tdddddgiƒ}|jddd}t|dƒ}||ks8t‚dS)    Nrr5r`r6r„F)r"rZgh14998_expected_outputrprqrrrÚtest_to_html_no_index_max_rowss
röcCsÀtdddgdddggddd    gddd    ggd
d gd }td gdddggdddgddd    ggddgd }t dtjtjgtjdtjgtjtjdgg¡}t|||ƒ}|jd    d}t|dƒ}||ks¼t‚dS)NÚbaZbbZbcÚcaÚcbÚccrr5r`rMrN)ÚlevelsÚcodesrƒrXZaaÚabÚacrLgð?g@g@)r¯Zgh6131_expected_output)rr%Úarrayr*rrBrrE)rr"rPr r-rGrgrrrÚ test_to_html_multiindex_max_colss"ýý&ÿ  
rcCs„ttdƒtddƒtddƒtddƒdœƒ}t ddgddgg¡|_t ddgdddd    d
gg¡|_|jd d }t|d ƒ}||ks€t‚dS)Nr‹r#r{rLrMrNrXÚerÚgFr!Zgh22579_expected_output)    rr~rrrPr"rBrrErqrrrÚ&test_to_html_multi_indexes_index_false#s"ÿ 
rÚ index_namesÚheaderr"zcolumn_index, column_typeZunnamed_standardú columns.namer}Znamed_standardrNZ unnamed_multizcolumns.name.0zcolumns.name.1Z named_multizrow_index, row_typez
index.namez index.name.0z index.name.1c Cs’ttjdtd||d}|j|||d}    |s2d}n|sH| d¡rHd|}|sRd}n|sh| d¡rhd|}d|d    |}
t||
ƒ} |    | ksŽt‚dS)
N)r`r`ršr§)r"rrÚnoneÚnamedÚunZindex_Ú    _columns_)rr%ÚzerosÚintrBÚ
startswithrrE© rZ    row_indexZrow_typeZ column_indexZ column_typer"rrr-rGrrgrrrÚtest_to_html_basic_alignment/s#
rr®rXrrr¿c Csštt d¡ dd¡||d}|jdd|||d}    |s:d}n|sP| d¡rPd|}|sZd}n|sp| d¡rpd|}d    |d
|}
t||
ƒ} |    | ks–t‚dS) Né@r®r§r„)rr¯r"rrrrr    Ztrunc_df_index_r
)rr%r)ZreshaperBr rrErrrrÚ&test_to_html_alignment_with_truncationds&)ÿ
rcCsRddgddgddgddgd    d
gg}t|ƒ}|jd |d }t|d ƒ}||ksNt‚dS)Nç"—Ž9ü?ç~ý,œÙ?çAG«ZÒQï?çÀ®&OYí@çu!V„áý?ç5#ƒÜEï¿ç8N
ógî?ça¥‚Šª_ÿç4iSulº¿ç©L1AGÚ?r„)rr"Zgh15019_expected_outputrp)rr"r r-rGrgrrrÚ,test_to_html_truncation_index_false_max_rows¡sû
rz col_index_named, expected_output)FZgh22783_expected_output)TZgh22783_named_columns_indexcCs`dddddgdddd    d
gg}t|ƒ}|r8|jjd d d |jd|d}t||ƒ}||ks\t‚dS)NrrrrrrrrrrrT)Zinplacer„)r¯r")rrPÚrenamerBrrE)rr"Zcol_index_namedZexpected_outputr r-rGrgrrrÚ,test_to_html_truncation_index_false_max_cols±s
 þ
rÚnotebookcCsptddddgiƒ}|j|d}|rHd|ks.t‚d|ks:t‚d|kslt‚n$d|ksTt‚d|ks`t‚d|kslt‚dS)    Nrr5r`r6©rztbody tr th:only-of-typezvertical-align: middle;zthead th)rrBrE)rr-rGrrrÚtest_to_html_notebook_has_styleÆs     r!cCs<tdddgitddgddd}|jd    d
}d|ks8t‚dS) Nrr5r`rLrMÚ myindexnamer}r!F)r©rrrBrE©r-rGrrrÚ#test_to_html_with_index_names_falseÕs  r%cCs>tdddgitddgddd}|jd    d
d }d |ks:t‚dS) Nrr5r`rLrMr"r}r!FZTEST_ID)rZtable_idz  id="TEST_ID"r#r$rrrÚtest_to_html_with_idÜs r&zvalue,float_format,expected)g vöE™É?z%.3fZgh21625_expected_output)gY@z%.0fZgh22270_expected_outputcCs4td|giƒ}t||ƒ}|j|d}||ks0t‚dS)Nr@©rËrô)ÚvaluerËrgrr-rGrrrÚ(test_to_html_float_format_no_fixed_widthãs    
 r)zrender_links,expected)TZrender_links_true)FZrender_links_falsecCsLdddgdddgg}t|dddgd}|j|d}t||ƒ}||ksHt‚dS)    Nrz$https://pandas.pydata.org/?q1=a&q2=bz
pydata.orgzwww.pydata.orgrUr¾rO)Ú render_linksrp)r*rgrr r-rGrrrÚtest_to_html_render_linksòsþ 
r+zmethod,expectedrBcCstSr/©Ú lorem_ipsumr’rrrr“r”r¨cCstd|d…dS)Nr„z...r,r’rrrr“r”Ú max_colwidthr‹r#rŠc    CsDttgƒ}td|ƒt||ƒƒ}W5QRX||ƒ}||ks@t‚dS)Nzdisplay.max_colwidth)rr-rÚgetattrrE)Úmethodrgr.r-rGrrrÚ test_ignore_display_max_colwidths
 
 
 r1c    Cs4tƒ}d}tjt|d|j|dW5QRXdS)Nz(classes must be a string, list, or tuplerQró)rrYrZÚ    TypeErrorrB)ròr-r\rrrÚ!test_to_html_invalid_classes_typesr3c    CsZtdgdgd}tddƒ|jdd}|jdd}W5QRXd    |ksJt‚d
|ksVt‚dS) Nr5gž^)ËÇá?rOzdisplay.precisionr6Fr Tz0.55555z0.556)rrrBrE)r-r    rrrrÚ!test_to_html_round_column_headerss    r4ÚunitZ100pxz10%Z5emé–cCs|ttjjddƒ}|j|d}| d¡d}dd„| d¡Dƒ}t|tƒrVt|ƒd    }|D]}d
|›d }||ksZt‚qZdS) Nr4r7r9ÚtbodyrcSsg|]}t d|¡r|‘qSr:r;r>rrrrA.s z5test_to_html_with_col_space_units.<locals>.<listcomp>r_Zpxz<th style="min-width: z;">)    rr%r&rBrCrÍr rFrE)r5r-rGrHrIrgrrrÚ!test_to_html_with_col_space_units(s 
  r8cCs`tdtdƒiƒ}| ¡}t|dƒ}||ks.t‚tdtdƒiƒ}| ¡}t|dƒ}||ks\t‚dS)NrLr#Z(html_repr_min_rows_default_no_truncationé=Z$html_repr_min_rows_default_truncated)rr~r¨rrErqrrrÚtest_html_repr_min_rows_default6s
 
r:zmax_rows,min_rows,expected)r‹r„Z html_repr_max_rows_10_min_rows_4)r·NZ#html_repr_max_rows_12_min_rows_None)r‹r·Z!html_repr_max_rows_10_min_rows_12)Nr·Z#html_repr_max_rows_None_min_rows_12c    CsLtdtdƒiƒ}t||ƒ}td|d|ƒ| ¡}W5QRX||ksHt‚dS)NrLr9zdisplay.max_rowszdisplay.min_rows)rr~rrr¨rE)rrZmin_rowsrgr-rGrrrÚtest_html_repr_min_rowsFs
 
r;cCs"|}d|j_| ¡|j ¡dS)NrU)rPrrBÚT)Z/multiindex_year_month_day_dataframe_random_dataZymdrrrÚtest_to_html_multilevel]sr=Úna_repÚNaNZTedcCsRtddgddggddgd}|j|djd}t|dƒ}|j|d    }||ksNt‚dS)
NrgÂõ(\ó?ÚGroupÚDatarOz{:.2f})r>rËZgh13828_expected_output©r>)rrBr˜rrE)r>rr-rGrgrrrÚ$test_to_html_na_rep_and_float_formatesþû
 rCcCs>ttddddgdgƒ}|jdd}t|dƒ}||ks:t‚dS)Nr5r`r6r^ú-rBZgh47103_expected_output)rÚdictrBrrErqrrrÚ#test_to_html_na_rep_non_scalar_dataus 
rFcCs<tdddgid}|jdd„d}t|dƒ}||ks8t‚dS)    Nr@g@@Útest)r cSs|d›S)Nz,.0frr’rrrr“€r”z6test_to_html_float_format_object_col.<locals>.<lambda>r'Zgh40024_expected_outputrprqrrrÚ$test_to_html_float_format_object_col}s
rH)Zrr
rr<Únumpyr%rYrÜr±rrrrZpandas._testingZ_testingr(Zpandas.io.formats.formatr r˜r¼r-rrñr.Z_VALID_JUSTIFY_PARAMETERSr0ÚmarkZ parametrizerJr]rarer)rhrmrrrwrrˆrŽÚ to_datetimeZSeriesZCategoricalDtypeÚobjectr¤rªr²r³r½rÃrÈrÏrÐrÑrÓrÔrêrØÚzipÚrepeatÚmodr~rÙrÛrÝrÞrõrörrrrrrrr!r%r&r)r+r1r3r4r8r:r;r=rCrFrHrrrrÚ<module>s   ÿ 
 
 
þþ
 þþ
 
 
üþ    
ýþ
ý
ù
 
ýÿÿÿ
÷ ùÿ óæþ-
 
þ
    üþ    
 
 
    $þú    "ý÷þ
 
 ÿ
    7
  ÿüüþ ÿüüþþÿüùþþÿüùþ
þ 
þþ
þ
 
 
þþ     
    
 
øþ