Skip to content

2.0 compatibility tracker #1579

@cmp0xff

Description

@cmp0xff

The original 2.0 compatibility tracker #624 is very long. Here I list only the unresolved items as of 2025-12-23.

This is the list of things that are in pandas 2.0 release notes that need to be addressed in pandas-stubs. PR's welcome. If you do a PR, check off the item and put a link to the PR that closed it. One PR can address multiple issues.

Some of these may already have been taken care of, so if so, check them off and indicate with a comment such as "previously complete"

  • Construction with datetime64 or timedelta64 dtype with unsupported resolution (check allowable resolutions for pd.Series())
    • Need to add tests
  • DatetimeIndex.astype(), TimedeltaIndex.astype(), PeriodIndex.astype() Series.astype(), DataFrame.astype() with datetime64, timedelta64 or PeriodDtype dtypes no longer allow converting to integer dtypes other than “int64”, do obj.astype('int64', copy=False).astype(dtype) instead
  • to_datetime() and DatetimeIndex now allow sequences containing both datetime objects and numeric entries, matching Series behavior
  • Disallow computing cumprod for Timedelta object; previously this returned incorrect values
  • (https://pandas.pydata.org/docs/reference/api/pandas.Timestamp.fromordinal.html#pandas.Timestamp.fromordinal)
  • Enforced deprecation disallowing unit-less “datetime64” dtype in Series.astype() and DataFrame.astype()
  • Disallow parsing to Timedelta strings with components with units “Y”, “y”, or “M”, as these do not represent unambiguous durations
  • Disallow subclass-specific keywords (e.g. “freq”, “tz”, “names”, “closed”) in the Index constructor
  • Removed the level keyword in DataFrame and Series aggregations
  • Removed Series.str.__iter__()
  • Enforced disallowing passing an integer fill_value to DataFrame.shift() and Series.shift`() with datetime64, timedelta64, or period dtypes
  • Enforced disallowing a tuple of column labels into DataFrameGroupBy.__getitem__()
  • Enforced disallowing set or dict indexers in __getitem__ and __setitem__ methods
  • Changed behavior of comparison of a Timestamp with a datetime.date object; these now compare as un-equal and raise on inequality comparisons
  • Changed behavior of comparison of NaT with a datetime.date object; these now raise on inequality comparisons
  • Enforced deprecation disallowing passing numeric_only=True to Series reductions (rank, any, all, …) with non-numeric dtype

Resolved

Metadata

Metadata

Assignees

No one assigned

    Labels

    Master TrackerHigh level tracker for similar issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions