Skip to content

Commit 363bf13

Browse files
committed
Fixed pandas-dev#38419 - BUG: set_index screws up the dtypes on empty DataFrames
1 parent b3e77e5 commit 363bf13

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/frame/methods/test_set_index.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ def test_set_index_empty_column(self):
5050
def test_set_index_empty_dataframe(self):
5151
# GH#38419
5252
df = DataFrame(
53-
{'a': Series(dtype='datetime64[ns]'),
54-
'b': Series(dtype='int64'),
55-
'c': []}
53+
{
54+
'a': Series(dtype='datetime64[ns]'),
55+
'b': Series(dtype='int64'),
56+
'c': []
57+
}
5658
)
5759

5860
if df.empty:

0 commit comments

Comments
 (0)