BUG: .isin on datetimelike indexes do not validate input of level parameter · Issue #26675 · pandas-dev/pandas (original) (raw)
Code Sample, a copy-pastable example if possible
index = pd.DatetimeIndex([], name='foo') index.isin([], level='foobar')
Problem description
on master:
on 0.23.4
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-82f8aeda6721> in <module>
1 index = pd.DatetimeIndex([], name='foo')
----> 2 index.isin([], level='foobar')
TypeError: isin() got an unexpected keyword argument 'level'
Expected Output
to validate input and raise same message as other non-datetimelike indexes
KeyError: 'Level foobar must be same as name (foo)'
the api for isin
is defined in #7892
Output of pd.show_versions()
[paste the output of pd.show_versions()
here below this line]