8000 TST:Add test to check single category col returns series with single row slice by ryankarlos · Pull Request #29521 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TST:Add test to check single category col returns series with single row slice #29521

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

Merged
merged 4 commits into from
Nov 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add issue number
  • Loading branch information
ryankarlos committed Nov 10, 2019
commit 7898b1b15859002a2300afb127628d65644fdb41
1 change: 1 addition & 0 deletions pandas/tests/frame/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ def test_astype_categoricaldtype_class_raises(self, cls):
df["A"].astype(cls)

def test_singlerow_slice_categoricaldtype_gives_series(self):
# GH29521
df = pd.DataFrame({"x": pd.Categorical("a b c d e".split())})
raw_cat = pd.Categorical(["a"], categories=["a", "b", "c", "d", "e"])
expected = pd.Series(raw_cat, index=["x"], name=0, dtype="category")
Expand Down
0