Skip to content

Commit c8094e7

Browse files
committed
Delete exception from pandas frame
1 parent 0691c5c commit c8094e7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pandas/core/frame.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,10 @@ def __init__(
738738
original_dtype = dtype
739739

740740
# GH47215
741-
if isinstance(index, set):
742-
raise ValueError("index cannot be a set")
743-
if isinstance(columns, set):
744-
raise ValueError("columns cannot be a set")
741+
# if isinstance(index, set):
742+
# raise ValueError("index cannot be a set")
743+
# if isinstance(columns, set):
744+
# raise ValueError("columns cannot be a set")
745745

746746
if copy is None:
747747
if isinstance(data, dict):

pandas/tests/frame/test_constructors.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3111,13 +3111,13 @@ def test_construction_from_ndarray_with_eadtype_mismatched_columns(self):
31113111
with pytest.raises(ValueError, match=msg):
31123112
DataFrame(arr2, columns=["foo", "bar"])
31133113

3114-
def test_columns_indexes_raise_on_sets(self):
3114+
# def test_columns_indexes_raise_on_sets(self):
31153115
# GH 47215
3116-
data = [[1, 2, 3], [4, 5, 6]]
3117-
with pytest.raises(ValueError, match="index cannot be a set"):
3118-
DataFrame(data, index={"a", "b"})
3119-
with pytest.raises(ValueError, match="columns cannot be a set"):
3120-
DataFrame(data, columns={"a", "b", "c"})
3116+
# data = [[1, 2, 3], [4, 5, 6]]
3117+
# with pytest.raises(ValueError, match="index cannot be a set"):
3118+
# DataFrame(data, index={"a", "b"})
3119+
# with pytest.raises(ValueError, match="columns cannot be a set"):
3120+
# DataFrame(data, columns={"a", "b", "c"})
31213121

31223122
# TODO: make this not cast to object in pandas 3.0
31233123
@pytest.mark.skipif(

0 commit comments

Comments
 (0)