8000 TST(string dtype): Resolve xfails in test_from_dummies by rhshadrach · Pull Request #60694 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TST(string dtype): Resolve xfails in test_from_dummies #60694

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 9 commits into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
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
type-hint
  • Loading branch information
rhshadrach committed Jan 25, 2025
commit 35598ee1db7f21368daf43e944dc321e25614773
7 changes: 5 additions & 2 deletions pandas/core/reshape/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
from pandas.core.series import Series

if TYPE_CHECKING:
from pandas._typing import NpDtype
from pandas._typing import (
DtypeObj,
NpDtype,
)


def get_dummies(
Expand Down Expand Up @@ -556,7 +559,7 @@ def from_dummies(
"Dummy DataFrame contains multi-assignment(s); "
f"First instance in row: {assigned.idxmax()}"
)
dtype = data.columns.dtype
dtype: str | DtypeObj = data.columns.dtype
if any(assigned == 0):
if isinstance(default_category, dict):
value = default_category[prefix]
Expand Down
8 changes: 3 additions & 5 deletions pandas/tests/io/pytables/test_complex.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest

from pandas._config import using_string_dtype

import pandas as pd
from pandas import (
DataFrame,
Expand All @@ -13,9 +11,9 @@

from pandas.io.pytables import read_hdf

pytestmark = pytest.mark.xfail(
using_string_dtype(), reason="TODO(infer_string)", strict=False
)
# pytestmark = pytest.mark.xfail(
# using_string_dtype(), reason="TODO(infer_string)", strict=False
# )


def test_complex_fixed(tmp_path, setup_path):
Expand Down
6 changes: 2 additions & 4 deletions pandas/tests/io/pytables/test_file_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import numpy as np
import pytest

from pandas._config import using_string_dtype

from pandas.compat import (
PY311,
is_ci_environment,
Expand Down Expand Up @@ -329,7 +327,7 @@ def test_complibs(tmp_path, lvl, lib, request):
assert node.filters.complib == lib


@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
# @pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
@pytest.mark.skipif(
not is_platform_little_endian(), reason="reason platform is not little endian"
)
Expand All @@ -347,7 +345,7 @@ def test_encoding(setup_path):
tm.assert_frame_equal(result, expected)


@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
# @pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)", strict=False)
@pytest.mark.parametrize(
"val",
[
Expand Down
8 changes: 3 additions & 5 deletions pandas/tests/io/pytables/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import numpy as np
import pytest

from pandas._config import using_string_dtype

from pandas._libs.tslibs.timezones import maybe_get_tz
import pandas.util._test_decorators as td

Expand All @@ -25,9 +23,9 @@
ensure_clean_store,
)

pytestmark = pytest.mark.xfail(
using_string_dtype(), reason="TODO(infer_string)", strict=False
)
# pytestmark = pytest.mark.xfail(
# using_string_dtype(), reason="TODO(infer_string)", strict=False
# )


def _compare_with_tz(a, b):
Expand Down
0