Skip to content

Some cleanups of merge_asof tests and error code #26249

Closed
@chrish42

Description

@chrish42

This is a follow-up to #26242, for the following points:

  • Add test in test_merge_asof.py that checks that merge_asof() raises an exception if called on unordered categories for a merge key.
  • Remove docstrings in tests in test_merge_asof.py
  • Add test to check that merge_asof works when one of the merge keys is an ordered categorical
  • Raise MergeError sooner (rather than the ValueError that happens later) when asked to do a merge and one of the keys is an unordered categorical.
  • use repr(x.dtype) instead of x.dtype as input to .format() in exception messages everywhere in merge.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    CleanReshapingConcat, Merge/Join, Stack/Unstack, ExplodeTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions