-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
TST: Check error raised when inserting wrong length categorical column #29523
TST: Check error raised when inserting wrong length categorical column #29523
Conversation
pandas/tests/frame/test_dtypes.py
Outdated
@@ -724,6 +724,13 @@ def test_astype_duplicate_col(self): | |||
expected = concat([a1_str, b, a2_str], axis=1) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_wrong_length_cat_dtype_raises(self): | |||
cat = pd.Categorical.from_codes([0, 1, 1, 0, 1, 2], ["a", "b", "c"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the issue number here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Any ides why CI is failing on Linux Py36 ? Doesn't seem related to my additions - having similar issue in #29522
|
Just a flakey test: #29514 Could you try pushing again? |
549c872
to
8bbe8ee
Compare
Ok just repushed - waiting for CI |
CI failures still related to that test #29514 |
8bbe8ee
to
551d855
Compare
Thanks - will try repushing again and see if it works now. |
pandas/tests/frame/test_dtypes.py
Outdated
# GH29523 | ||
cat = pd.Categorical.from_codes([0, 1, 1, 0, 1, 2], ["a", "b", "c"]) | ||
df = pd.DataFrame({"bar": range(10)}) | ||
err = "Length of values does not match length of index" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move this test to pandas/tests/frame/test_indexing.py in the class TestDataFrameIndexingCategorical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fdbcbea
to
27de8fb
Compare
thanks @ryankarlos |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff