Skip to content

Conversation

@smathot
Copy link

@smathot smathot commented Jun 19, 2025

Currently, pairplot(), unlike other plotting functions, requires that the data is a pd.DataFrame. This prevents the function from working with objects that are fully compatible with DataFrame, but are of a different class. By changing the check to requiring the presence of a __dataframe__ attribute, this is resolved.

The patch relies on the DataFrame interoperability protocol (which is a fancy of saying that it checks the existence of a __dataframe__() function) as well as the soft-standard of the __array__() function for array-like objects.

For me, the main reason to submit this PR is to make seaborn fully compatible with DataMatrix 2.0. (Right now, pairplot() is the only plot still failing.)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant