def test_to_datetime_utc_is_true(self):
# See gh-11934
start = pd.Timestamp('2014-01-01', tz='utc')
end = pd.Timestamp('2014-01-03', tz='utc')
date_range = pd.bdate_range(start, end)
result = pd.to_datetime(date_range, utc=True)
expected = pd.DatetimeIndex(data=date_range)
tm.assert_index_equal(result, expected)
test_timeseries.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录