Skip to content

DEPR: Deprecate dtype inference on pandas objects #56244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 21, 2023
Merged
Prev Previous commit
Address comments
  • Loading branch information
phofl committed Dec 21, 2023
commit cd067cc8b6f9fa4424e9086459bad1b2f1560e7b
5 changes: 2 additions & 3 deletions pandas/tests/series/accessors/test_dt_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@ def test_dt_accessor_limited_display_api(self):
tm.assert_almost_equal(results, sorted(set(ok_for_dt + ok_for_dt_methods)))

# Period
idx = period_range("20130101", periods=5, freq="D", name="xxx").astype(object)
with tm.assert_produces_warning(FutureWarning, match="Dtype inference"):
ser = Series(
period_range("20130101", periods=5, freq="D", name="xxx").astype(object)
)
ser = Series(idx)
results = get_dir(ser)
tm.assert_almost_equal(
results, sorted(set(ok_for_period + ok_for_period_methods))
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/series/methods/test_between.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_between(self):
tm.assert_series_equal(result, expected)

def test_between_datetime_object_dtype(self):
ser = Series(bdate_range("1/1/2000", periods=20).astype(object), dtype=object)
ser = Series(bdate_range("1/1/2000", periods=20), dtype=object)
ser[::2] = np.nan

result = ser[ser.between(ser[3], ser[17])]
Expand Down