1
2
3
4
5
6
7
8
9
10
11
12
U
®ý°d}ã@sHddlZddlmZmZmZmZmZdd„Z    dd„Z
dd„Z d    d
„Z dS) éN)Ú    DataFrameÚIndexÚ
MultiIndexÚSeriesÚ_testingcCsªtddtjg|d}|j d¡}tdddgdddgdddggtdƒd}t ||¡td    d
d g|d}|j d ¡}tdddgdddgdddggtd ƒd}t ||¡dS)Núa|búa|c©Zdtypeú|érÚabc©Úcolumnsza;bÚaéú;Z7ab)    rÚnpÚnanÚstrÚ get_dummiesrÚlistÚtmÚassert_frame_equal©Zany_string_dtypeÚsÚresultÚexpected©rú\d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/strings/test_get_dummies.pyÚtest_get_dummies s (  (rcCs>tdddgƒ}|j d¡}tjdddgdd    }t ||¡dS)
Nrrzb|cr
)r r r)r rr )rr r )rÚbÚc©Únames©rrrrÚ from_tuplesrZassert_index_equal©ÚidxrrrrrÚtest_get_dummies_indexs ÿr(cCsXtdddg|d}|j d¡}tdddgdddgdddggdddgd    }t ||¡dS)
Nrzb,namer r    ú,r rÚnamer )rrrrrrrrrrÚ test_get_dummies_with_name_dummy#s *r+cCs>tdddgƒ}|j d¡}tjdddgdd    }t ||¡dS)
Nrzname|czb|namer
)r r rr)rrr r )rr rr )rr r!r*r"r$r&rrrÚ&test_get_dummies_with_name_dummy_index,s ÿr,) ÚnumpyrZpandasrrrrrrrr(r+r,rrrrÚ<module>s