-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
Pandas 1.2.0 added a Float64DType type extension. Seaborn boxenplot fails with that input:
data = pd.DataFrame(
{"cont": np.random.random(20), "cat": np.random.choice(["a", "b"], 20)}
).convert_dtypes()
sns.boxplot(data=data, x='cat', y='cont') # okay
sns.boxenplot(data=data, x='cat', y='cont') # error
At the same time Barplot and Boxplot don't fail. This is because boxenplot is at some point converting the input into a numpy array which makes the array dtype 'object'. That dtype fails when is input to np.isfinite
here.