Skip to content

3.0 compatibility tracker #1654

@loicdiridollou

Description

@loicdiridollou

This seems like a good starting point with all the changes in 3.0.0 from their release notes.
Not all will need to be taken care of, feel free to mark them as done when addressed.

Updated deprecation policy

Other enhancements

I/O:

Groupby/resample/rolling:

Reshaping:

Missing:

Numeric:

Strings:

Datetimelike:

  • Easter has gained a new constructor argument method which specifies the method used to calculate Easter — for example, Orthodox Easter (GH 61665)
  • Holiday constructor argument days_of_week will raise a ValueError when type is something other than None or tuple (GH 61658)
  • Holiday has gained the constructor argument and field exclude_dates to exclude specific datetimes from a custom holiday calendar (GH 54382)
  • Added half-year offset classes HalfYearBegin, HalfYearEnd, BHalfYearBegin and BHalfYearEnd (GH 60928)
  • Improved deprecation message for offset aliases (GH 60820)
  • Multiplying two DateOffset objects will now raise a TypeError instead of a RecursionError (GH 59442)

Indexing:

Styler / output formatting:

Typing:

Plotting:

ExtensionArray:

Other:

Packaging:

  • Switched wheel upload to PyPI Trusted Publishing (OIDC) for release-tag pushes in wheels.yml. (GH 61718)
  • Wheels are now available for Windows ARM64 architecture (GH 61462)
  • Wheels are now available for free-threading Python builds on Windows (in addition to the other platforms) (GH 61463)

Other API changes

  • 3rd party py.path objects are no longer explicitly supported in IO methods. Use pathlib.Path objects instead (GH 57091)
  • read_table()’s parse_dates argument defaults to None to improve consistency with read_csv() (GH 57476)
  • Period.to_timestamp() and PeriodIndex.to_timestamp() now give microsecond-unit objects when possible, and nanosecond-unit objects in other cases. This affects the actual value of Period.end_time() and PeriodIndex.end_time() (GH 56164)
  • All classes inheriting from builtin tuple (including types created with collections.namedtuple()) are now hashed and compared as builtin tuple during indexing operations (GH 57922)
  • Made dtype a required argument in ExtensionArray._from_sequence_of_strings() (GH 56519)
  • Passing a Series input to json_normalize() will now retain the Series Index, previously output had a new RangeIndex (GH 51452)
  • Pickle and HDF (.h5) files created with Python 2 are no longer explicitly supported (GH 57387)
  • Pickled objects from pandas version less than 1.0.0 are no longer supported (GH 57155)
  • Removed Index.sort() which always raised a TypeError. This attribute is not defined and will raise an AttributeError (GH 59283)
  • Unused dtype argument has been removed from the MultiIndex constructor (GH 60962)
  • Updated DataFrame.to_excel() so that the output spreadsheet has no styling. Custom styling can still be done using Styler.to_excel() (GH 54154)
  • When comparing the indexes in testing.assert_series_equal(), check_exact defaults to True if an Index is of integer dtype. (GH 57386)
  • Index set operations (like union or intersection) will now ignore the dtype of an empty RangeIndex or empty Index with object dtype when determining the dtype of the resulting Index (GH 60797)
  • IncompatibleFrequency now subclasses TypeError instead of ValueError. As a result, joins with mismatched frequencies now cast to object like other non-comparable joins, and arithmetic with indexes with mismatched frequencies align (GH 55782)
  • Series “flex” methods like Series.add() no longer allow passing a DataFrame for other; use the DataFrame reversed method instead (GH 46179)
  • date_range() and timedelta_range() no longer default to unit="ns", instead will infer a unit from the start, end, and freq parameters. Explicitly specify a desired unit to override these (GH 59031)
  • CategoricalIndex.append() no longer attempts to cast different-dtype indexes to the caller’s dtype (GH 41626)
  • ExtensionDtype.construct_array_type() is now a regular method instead of a classmethod (GH 58663)
  • Arithmetic operations between a Series, Index, or ExtensionArray with a list now consistently wrap that list with an array equivalent to Series(my_list).array. To do any other kind of type inference or casting, do so explicitly before operating (GH 62552)
  • Comparison operations between Index and Series now consistently return Series regardless of which object is on the left or right (GH 36759)
  • NumPy functions like np.isinf that return a bool dtype when called on a Index object now return a bool-dtype Index instead of np.ndarray (GH 52676)
  • Methods that can operate in-place (replace(), fillna(), ffill(), bfill(), interpolate(), where(), mask(), clip()) now return the modified DataFrame or Series (self) instead of None when inplace=True (GH 63207)
  • All Index constructors now copy numpy.ndarray and ExtensionArray inputs by default when copy=None, consistent with Series behavior (GH 63388)

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