Skip to content
Merged
Changes from 3 commits
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
9 changes: 9 additions & 0 deletions pandas/tests/frame/methods/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import pytest

from pandas.errors import InvalidIndexError

import pandas as pd
from pandas import (
DataFrame,
Expand Down Expand Up @@ -369,3 +371,10 @@ def test_frame_join_tzaware(self):

tm.assert_index_equal(result.index, expected)
assert result.index.tz.zone == "US/Central"

def test_duplicate_indices_concat_raise(self):
# https://github.com/pandas-dev/pandas/issues/36263
df1 = DataFrame(np.random.randn(5), index=[0, 1, 2, 3, 3], columns=["a"])
df2 = DataFrame(np.random.randn(5), index=[0, 1, 2, 2, 4], columns=["b"])
with pytest.raises(InvalidIndexError):
pd.concat([df1, df2], axis=1)