You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix to_datetime nanosecond inference and DatetimeIndex tz wall-time interpretation (#23141)
- `to_datetime` infers nanosecond precision for strings with more than 6 fractional-second digits, matching pandas.
- `DatetimeIndex` with a timezone dtype treats timezone-naive strings/datetimes as wall time in the target timezone, while numeric data stays interpreted as UTC epoch values.
- Removes 13 now-passing entries from the pandas-testing plugin.
- Split out from #23138.
Authors:
- GALI PREM SAGAR (https://github.com/galipremsagar)
Approvers:
- Matthew Roeschke (https://github.com/mroeschke)
URL: #23141
"tests/indexes/datetimes/test_arithmetic.py::TestDatetimeIndexArithmetic::test_add_dti_day": "TypeError: unsupported operand type(s) for +: 'DatetimeArray' and 'DateOffset'",
2321
2321
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_coverage": "TODO: Add a reason for failure",
2322
2322
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_datetime64_tzformat[W-SUN]": "TODO: Add a reason for failure",
2323
-
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_dtype": "AssertionError: Index are different",
2324
2323
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_dtype_tz_mismatch_raises": "Failed: DID NOT RAISE <class 'ValueError'>",
2325
-
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_start_end_with_tz[America/Los_Angeles]": "NotImplementedError: freq is not implemented yet",
2326
-
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_start_end_with_tz[None]": "NotImplementedError: freq is not implemented yet",
2327
-
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_start_end_with_tz[tz2]": "NotImplementedError: freq is not implemented yet",
2328
-
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_constructor_start_end_with_tz[tz3]": "NotImplementedError: freq is not implemented yet",
"tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_integer_values_and_tz_interpreted_as_utc": "AssertionError: Index are different",
2331
2325
"tests/indexes/datetimes/test_constructors.py::TestTimeSeries::test_constructor_int64_nocopy": "TODO: Add a reason for failure",
2332
2326
"tests/indexes/datetimes/test_constructors.py::TestTimeSeries::test_dti_constructor_small_int[int16]": "AssertionError: Index are different",
2333
2327
"tests/indexes/datetimes/test_constructors.py::TestTimeSeries::test_dti_constructor_small_int[int32]": "AssertionError: Index are different",
"tests/reshape/concat/test_concat.py::test_concat_ignore_empty_object_float[object-datetime64[ns]]": "AssertionError: Attributes of DataFrame.iloc[:, 0] (column name='foo') are different",
3419
3407
"tests/reshape/concat/test_concat.py::test_concat_ignore_empty_object_float[object-float64]": "AssertionError: Attributes of DataFrame.iloc[:, 0] (column name='foo') are different",
3420
3408
"tests/reshape/concat/test_concat.py::test_concat_ignore_empty_object_float[object-int64]": "TODO: Add a reason for failure",
3421
-
"tests/reshape/concat/test_datetimes.py::TestTimezoneConcat::test_concat_multiindex_with_tz": "AssertionError: DataFrame.index level [0] are different",
3422
3409
"tests/reshape/concat/test_datetimes.py::test_concat_float_datetime64": "TODO: Add a reason for failure",
3423
3410
"tests/reshape/concat/test_empty.py::TestEmptyConcat::test_concat_empty_dataframe_dtypes": "TODO: Add a reason for failure",
3424
3411
"tests/reshape/concat/test_empty.py::TestEmptyConcat::test_concat_empty_df_object_dtype": "TODO: Add a reason for failure",
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_list_like_values[True-list]": "AssertionError: Attributes of DataFrame.iloc[:, 0] (column name='('baz', 'A')') are different",
3705
3692
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_list_like_values_nans[False-values0]": "TODO: Add a reason for failure",
3706
3693
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_list_like_values_nans[True-values0]": "TODO: Add a reason for failure",
3707
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[ms-False]": "AssertionError: DataFrame.index are different",
3708
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[ms-True]": "AssertionError: DataFrame.index are different",
3709
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[ns-False]": "AssertionError: DataFrame.index are different",
3710
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[ns-True]": "AssertionError: DataFrame.index are different",
3711
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[s-False]": "AssertionError: DataFrame.index are different",
3712
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[s-True]": "AssertionError: DataFrame.index are different",
3713
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[us-False]": "AssertionError: DataFrame.index are different",
3714
-
"tests/reshape/test_pivot.py::TestPivotTable::test_pivot_with_tz[us-True]": "AssertionError: DataFrame.index are different",
3715
3694
"tests/reshape/test_pivot_multilevel.py::test_pivot_list_like_columns[input_index1-input_columns1-values-expected_values1-expected_columns1-expected_index1]": "TODO: Add a reason for failure",
3716
3695
"tests/reshape/test_pivot_multilevel.py::test_pivot_list_like_columns[input_index3-input_columns3-values-expected_values3-expected_columns3-expected_index3]": "TODO: Add a reason for failure",
3717
3696
"tests/reshape/test_pivot_multilevel.py::test_pivot_list_like_columns[lev4-input_columns0-values-expected_values0-expected_columns0-expected_index0]": "TODO: Add a reason for failure",
"tests/test_algos.py::TestFactorize::test_factorize[tuples-False]": "AssertionError: Index are different",
4348
4327
"tests/test_algos.py::TestFactorize::test_factorize[tuples-True]": "AssertionError: Index are different",
4349
4328
"tests/test_algos.py::TestFactorize::test_int_factorize_use_na_sentinel_false[data0-expected_codes0-expected_uniques0]": "TODO: Add a reason for failure",
4350
-
"tests/test_algos.py::TestUnique::test_datetime64_dtype_array_returned": "TODO: Add a reason for failure",
4351
4329
"tests/test_algos.py::TestUnique::test_factorize_multiindex_empty": "AssertionError: Index are different",
4352
-
"tests/test_algos.py::TestUnique::test_order_of_appearance_dt64tz[ms]": "AssertionError: Index are different",
4353
-
"tests/test_algos.py::TestUnique::test_order_of_appearance_dt64tz[ns]": "AssertionError: Index are different",
4354
-
"tests/test_algos.py::TestUnique::test_order_of_appearance_dt64tz[s]": "AssertionError: Index are different",
4355
-
"tests/test_algos.py::TestUnique::test_order_of_appearance_dt64tz[us]": "AssertionError: Index are different",
4356
4330
"tests/test_algos.py::TestValueCounts::test_value_counts_dropna": "TODO: Add a reason for failure",
4357
4331
"tests/test_algos.py::TestValueCounts::test_value_counts_stability": "AssertionError: Series.index are different",
"tests/tools/test_to_datetime.py::TestOrigin::test_julian": "AssertionError: Attributes of Series are different",
4467
4441
"tests/tools/test_to_datetime.py::TestOrigin::test_to_datetime_out_of_bounds_with_format_arg[%Y-%d-%m %H:%M:%S-None]": "TODO: Add a reason for failure",
4468
4442
"tests/tools/test_to_datetime.py::TestOrigin::test_to_datetime_out_of_bounds_with_format_arg[%Y-%m-%d %H:%M:%S-None]": "TODO: Add a reason for failure",
0 commit comments