zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
U
­ý°d™ã@sBddlmZddlZddlmZmZddlmZ    Gdd„dƒZ
dS)é)Ú    timedeltaN)Ú DatetimeIndexÚ
date_rangec@seZdZdd„Zdd„ZdS)ÚTestDatetimeIndexReindexcCsPtdddd}t| g¡djƒdks*t‚t| t g¡¡djƒdksLt‚dS)Nz
2013-01-01éz
US/Eastern©ZperiodsÚtzr)rÚstrÚreindexrÚAssertionErrorÚnpÚarray)ÚselfÚindex©rúbd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/indexes/datetimes/test_reindex.pyÚ:test_reindex_preserves_tz_if_target_is_empty_list_or_array szSTestDatetimeIndexReindex.test_reindex_preserves_tz_if_target_is_empty_list_or_arraycCs¼tddddd}tddddd}|j|dtdd    d
\}}d d d ddddddddddddddddddd d!g}t|d"dd#}tjd$gd%gd&dgt d'¡d(}t ||¡t     ||¡dS))Nz
2010-01-01z
2010-01-02éÚutcréZnearesté)Úseconds)ÚmethodZ    tolerancez2010-01-01 00:00:00z2010-01-01 01:05:27.272727272z2010-01-01 02:10:54.545454545z2010-01-01 03:16:21.818181818z2010-01-01 04:21:49.090909090z2010-01-01 05:27:16.363636363z2010-01-01 06:32:43.636363636z2010-01-01 07:38:10.909090909z2010-01-01 08:43:38.181818181z2010-01-01 09:49:05.454545454z2010-01-01 10:54:32.727272727z2010-01-01 12:00:00z2010-01-01 13:05:27.272727272z2010-01-01 14:10:54.545454545z2010-01-01 15:16:21.818181818z2010-01-01 16:21:49.090909090z2010-01-01 17:27:16.363636363z2010-01-01 18:32:43.636363636z2010-01-01 19:38:10.909090909z2010-01-01 20:43:38.181818181z2010-01-01 21:49:05.454545454z2010-01-01 22:54:32.727272727z2010-01-02 00:00:00zdatetime64[ns, UTC])ÚdtypeÚfreqréÿÿÿÿéZintp)r)
rr
rrr r rÚtmZassert_index_equalZassert_numpy_array_equal)rZrng_aZrng_bZresult1Zresult2Zexpected_list1Z    expected1Z    expected2rrrÚ!test_reindex_with_same_tz_nearestsNÿ
éÿ& z:TestDatetimeIndexReindex.test_reindex_with_same_tz_nearestN)Ú__name__Ú
__module__Ú __qualname__rrrrrrr sr) ÚdatetimerÚnumpyr ZpandasrrZpandas._testingZ_testingrrrrrrÚ<module>s