A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/7724 below:

Bug behavior when checking element inclusion in non-unique MultiIndex · Issue #7724 · pandas-dev/pandas · GitHub

I am using pandas.__version__==0.14.0.
This is my first bug report in github so excuse my possibly poorly formatted submission.

This bug report might be related to, or duplicate:

  1. multi-index indexing for 3-level index behaving mysteriously. #2646
  2. get_loc() returns integer or slice or KeyError nondeterministic in multiindex data frame #6501

It was explained to me by [http://stackoverflow.com/users/1427416/brenbarn] on the following StackOverflow question, http://stackoverflow.com/questions/24683023/having-issue-with-hierarchical-index-set-behavior/24684844#24684844

Essentially, the following behavior is not desirable:

print pd.__version__
WeirdIdx = pd.MultiIndex(levels=[[0], [1]],labels=[[0, 0], [0,0]],names=[u'X', u'Y'])
print WeirdIdx
print (0, 0) in WeirdIdx
print (1, 0) in WeirdIdx
print (100, 0) in WeirdIdx
print (100, 100) in WeirdIdx

since it prints:
0.14.0
X Y
0 1
1
True
True
True
True

despite the fact that (100,0) and (100,100) are unambiguously not part of the index.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4