Skip to content

Have the possibility for Series.unique() to return a Series rather than an array #1923

Closed
@lbeltrame

Description

@lbeltrame

I admit I haven't looked at the code so there may be reasons for this, but I've found myself in the need of squeezing out duplicates from a Series but keeping the results as a Series.

Series.unique() however returns an array, so in my code I have to construct a Series twice:

series = pandas.Series([1,2,3,3])
series = pandas.Series(series.unique())

Is this by design? If so, feel free to close this bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions