Skip to content

Add tests for categorical with null ea as input #37611

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 5 commits into from
Nov 13, 2020

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 3, 2020

  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

cc @jreback Is this what you had in mind for ExtensionArrays and Categoricals?

@phofl phofl added Categorical Categorical Data Type ExtensionArray Extending pandas with custom dtypes or arrays. labels Nov 3, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is what i was looking

@@ -682,3 +682,11 @@ def test_interval(self):
expected_codes = np.array([0, 1], dtype="int8")
tm.assert_numpy_array_equal(cat.codes, expected_codes)
tm.assert_index_equal(cat.categories, idx)

@pytest.mark.parametrize("nullable", [pd.NA, NaT])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually you can use the null_fixture here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, done.

@jreback jreback added this to the 1.2 milestone Nov 4, 2020
@jreback jreback added the Testing pandas testing functions or related to the test suite label Nov 4, 2020
@jreback
Copy link
Contributor

jreback commented Nov 13, 2020

@phofl can you merge master and ping on green.

@jreback jreback merged commit 0e59178 into pandas-dev:master Nov 13, 2020
@phofl phofl deleted the tst_ea_categorical branch November 13, 2020 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type ExtensionArray Extending pandas with custom dtypes or arrays. Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants