Skip to content

REGR: merge no longer accepts a list for suffixes keyword #34741

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

see #34208 (comment)

The linked PR changed the merge routines to now only accept tuples for the suffixes keyword, and no longer general sequence.

This is a breaking change (eg it breaks some GeoPandas functions), but actually also changing documented behaviour: the merge docstring indeed says "tuple", but eg merge_asof still says "tuple or list". And in our user guide, we were ourselves using a list in one example, and it explicitly says "tuple or list" (see https://pandas.pydata.org/pandas-docs/version/1.0/user_guide/merging.html#overlapping-value-columns)

In general, I am certainly fine with restricting the set of accepted types (eg to avoid the confusing issue with sets, the original report), but this is 1) breaking a documented behaviour and 2) a change that could also easily be done with a deprecation warning.
And given our versioning policy, if it is easy to do a change with a deprecation, then we should try to do that, IMO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockerBlocking issue or pull request for an upcoming release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions