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

TST: better exception messages with na_values and pyarrow engine #56090

Merged
merged 4 commits into from
Nov 21, 2023

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite IO CSV read_csv, to_csv Arrow pyarrow functionality labels Nov 20, 2023
df = parser.read_csv(StringIO(data), na_values={"b": 2}, keep_default_na=False)
expected = DataFrame({"a": [1], "b": [np.nan]})
tm.assert_frame_equal(df, expected)


@xfail_pyarrow # ValueError: The pyarrow engine doesn't support passing a dict
# @xfail_pyarrow # ValueError: The pyarrow engine doesn't support passing a dict
Copy link
Member

Choose a reason for hiding this comment

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

Can this be removed now?

@@ -235,7 +259,7 @@ def test_na_value_dict_multi_index(all_parsers, index_col, expected):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow # ValueError: The pyarrow engine doesn't support passing a dict
# @xfail_pyarrow # ValueError: The pyarrow engine doesn't support passing a dict
Copy link
Member

Choose a reason for hiding this comment

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

Same

@@ -183,14 +200,21 @@ def test_bool_na_values(all_parsers):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow # ValueError: The pyarrow engine doesn't support passing a dict
# @xfail_pyarrow # ValueError: The pyarrow engine doesn't support passing a dict
Copy link
Member

Choose a reason for hiding this comment

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

Same

@mroeschke mroeschke added this to the 2.2 milestone Nov 21, 2023
@mroeschke mroeschke merged commit e8d9a32 into pandas-dev:main Nov 21, 2023
40 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

phofl pushed a commit to phofl/pandas that referenced this pull request Nov 21, 2023
…das-dev#56090)

* TST: better exception messages with na_values and pyarrow engine

* remove commented-out

* remove commented-out
@jbrockmendel jbrockmendel deleted the tst-pa-xfail-na_values branch November 21, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality IO CSV read_csv, to_csv Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants