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
| import numpy as np
| import pytest
|
| from pandas import (
| DataFrame,
| NaT,
| Series,
| Timestamp,
| )
|
|
| @pytest.mark.parametrize(
| "data,exp_size",
| [
| # see gh-16362.
| ([[NaT, "a", "b", 0], [NaT, "b", "c", 1]], 8),
| ([[NaT, "a", 0], [NaT, "b", 1]], 6),
| ],
| )
| def test_maybe_infer_to_datetimelike_df_construct(data, exp_size):
| result = DataFrame(np.array(data))
| assert result.size == exp_size
|
|
| def test_maybe_infer_to_datetimelike_ser_construct():
| # see gh-19671.
| result = Series(["M1701", Timestamp("20130101")])
| assert result.dtype.kind == "O"
|
|