Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing a row of a DataFrame with multiple ExtensionArrays coerces to object #22784

Closed
TomAugspurger opened this issue Sep 20, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@TomAugspurger
Copy link
Contributor

commented Sep 20, 2018

Code Sample, a copy-pastable example if possible

In [8]: df = pd.DataFrame({"A": pd.Categorical([1, 2]), "B": pd.Categorical([1, 2])})

In [9]: df.loc[0]
Out[9]:
A    1
B    1
Name: 0, dtype: object

Problem description

The dtype is object. It should be category

Expected Output

A    1
B    1
Name: 0, dtype: category
Categories (2, int64): [1, 2]

(for the release notes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.