Skip to content

BUG: plot with kind=scatter fails when checking if an array is in the DataFrame #8852

Closed
@TomAugspurger

Description

@TomAugspurger
df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
c = np.array([1, 0])
df.plot(kind='scatter', x='A', y='B', c=c, cmap='spring')

fails with a TypeError.

we check elif c in self.data.columns which tries to hash the array.

(I know I can just add the array as a column to the DataFrame)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions