Skip to content

matrixplot group order changes with pandas 1.2.0 #1562

Closed

Description

@ivirshup

@fidelram

The test test_matrixplot_obj fails if pandas>1.2.0 as the groups order changes. These groups are meant to be sorted with plot.add_totals(sort='descending'). All groups have the same value here, so my assumption is this is fine. I'm going to change the test for now, but it'd be good to hear back from you on whether this is a bug or not.

It would probably be good if we could ensure a stable sort was used so this won't change in future.

Activity

  1. fidelram commented on Jan 13, 2021

    @fidelram
    Collaborator

    If I understand correctly, pandas > 1.2.0 plot.add_totals(sort='descending') returns a different sorting compared to previous version. However, most of the categories have the same number of cells and thus a different sorting is equally valid.

    image

    My suggestion is to use other dataset in which the number of cells per category is different and update the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions