Skip to content

ERR: concat of 2 Series categories does not preserve category dtype #8641

Closed
@jreback

Description

@jreback

xref #8640

As this is inconcistent with how DataFrame concat's work (its a different code-path), so needs updating

s = Series(list('abc'),dtype='category')
s2 = Series(list('abd'),dtype='category')

# this should raise
pd.concat([s,s2])

# this should be a category
pd.concat([s,s])

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCategoricalCategorical Data TypeError ReportingIncorrect or improved errors from pandas

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions