Skip to content

DEPR: remove ix #27620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
704b422
remove IX
jbrockmendel Jul 27, 2019
ec02d1f
remove ix-only methods
jbrockmendel Jul 27, 2019
db1567f
lint fixups
jbrockmendel Jul 27, 2019
c8ff4a0
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Jul 27, 2019
2c8ef9a
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 17, 2019
1ed8a96
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 19, 2019
8abdbaf
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 22, 2019
23d2eca
restore getitem needed by geopandas
jbrockmendel Aug 22, 2019
ecc8b36
remove xfail
jbrockmendel Aug 22, 2019
9f78ec7
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 22, 2019
3ca8c86
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 23, 2019
812b5fb
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 23, 2019
2e09bd6
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 24, 2019
966f749
restore and update tests per comments
jbrockmendel Aug 24, 2019
18033b4
remove test_ix
jbrockmendel Aug 24, 2019
b9f61cb
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 26, 2019
c319080
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 27, 2019
e467976
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 27, 2019
cb7ef3b
remove ix benchmarks
jbrockmendel Aug 27, 2019
52f4ff1
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Aug 28, 2019
ffd50b0
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Sep 13, 2019
0f271c1
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Sep 18, 2019
44eb4fc
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Sep 26, 2019
bf9f3b3
post-merge fixup
jbrockmendel Sep 26, 2019
36afdbe
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Sep 27, 2019
fcc9db7
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 13, 2019
79b441c
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 25, 2019
223382b
TST: remove tests that use ix
jbrockmendel Nov 25, 2019
1756a69
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 27, 2019
07b393b
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 27, 2019
f9a394a
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 27, 2019
3d484cd
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 28, 2019
247eabf
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 29, 2019
7dc7de6
remove unused imports
jbrockmendel Nov 30, 2019
2b3dba7
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Nov 30, 2019
721d88b
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Dec 4, 2019
0ca6762
whatsnew, remove _ix
jbrockmendel Dec 4, 2019
446c21f
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Dec 5, 2019
a2aef80
update per comments
jbrockmendel Dec 9, 2019
74127d6
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
jbrockmendel Dec 9, 2019
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
Prev Previous commit
Next Next commit
Merge branch 'master' of https://github.com/pandas-dev/pandas into rmix
  • Loading branch information
jbrockmendel committed Nov 27, 2019
commit 07b393baa50d303c36e19a4f9cc24efe630cadc5
6 changes: 1 addition & 5 deletions pandas/tests/indexing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,9 @@ def _eq(axis, obj, key1, key2):
rs = getattr(obj, method1).__getitem__(_axify(obj, key1, axis))

try:
xp = self.get_result(
obj=obj, method=method2, key=key2, axis=axis
)
xp = self.get_result(obj=obj, method=method2, key=key2, axis=axis)
except (KeyError, IndexError):
# TODO: why is this allowed?
result = "no comp"
_print(result)
return

if is_scalar(rs) and is_scalar(xp):
Expand Down
8 changes: 5 additions & 3 deletions pandas/tests/indexing/test_iloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def test_iloc_non_integer_raises(self, index, columns, index_vals, column_vals):
df.iloc[index_vals, column_vals]

def test_iloc_getitem_int(self):
# integer
self.check_result(
"integer",
"iloc",
2,
"iloc",
Expand All @@ -146,8 +146,8 @@ def test_iloc_getitem_int(self):
)

def test_iloc_getitem_neg_int(self):
# neg integer
self.check_result(
"neg int",
"iloc",
-1,
"iloc",
Expand Down Expand Up @@ -223,7 +223,6 @@ def test_iloc_getitem_neg_int_can_reach_first_index(self):
tm.assert_series_equal(result, expected)

def test_iloc_getitem_dups(self):

# GH 6766
df1 = DataFrame([{"A": None, "B": 1}, {"A": 2, "B": 2}])
df2 = DataFrame([{"A": 3, "B": 3}, {"A": 4, "B": 4}])
Expand All @@ -238,9 +237,11 @@ def test_iloc_getitem_dups(self):
tm.assert_series_equal(result, expected)

def test_iloc_getitem_array(self):
# TODO: test something here?
pass

def test_iloc_getitem_bool(self):
# TODO: test something here?
pass

@pytest.mark.parametrize("index", [[True, False], [True, False, True, False]])
Expand All @@ -254,6 +255,7 @@ def test_iloc_getitem_bool_diff_len(self, index):
_ = s.iloc[index]

def test_iloc_getitem_slice(self):
# TODO: test something here?
pass

def test_iloc_getitem_slice_dups(self):
Expand Down
69 changes: 33 additions & 36 deletions pandas/tests/indexing/test_loc.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,12 @@ def test_loc_setitem_slice(self):
def test_loc_getitem_int(self):

# int label
self.check_result(
"int label", "loc", 2, "loc", 2, typs=["label"], fails=KeyError
)
self.check_result("loc", 2, "loc", 2, typs=["label"], fails=KeyError)

def test_loc_getitem_label(self):

# label
self.check_result(
"label", "loc", "c", "loc", "c", typs=["empty"], fails=KeyError
)
self.check_result("loc", "c", "loc", "c", typs=["empty"], fails=KeyError)

def test_loc_getitem_label_out_of_range(self):

Expand All @@ -118,44 +114,22 @@ def test_loc_getitem_label_out_of_range(self):
fails=KeyError,
)
self.check_result("loc", "f", "ix", "f", typs=["floats"], fails=KeyError)
self.check_result("loc", "f", "loc", "f", typs=["floats"], fails=KeyError)
self.check_result(
"label range", "loc", "f", "loc", "f", typs=["floats"], fails=KeyError
)
self.check_result(
"label range",
"loc",
20,
"loc",
20,
typs=["ints", "uints", "mixed"],
fails=KeyError,
"loc", 20, "loc", 20, typs=["ints", "uints", "mixed"], fails=KeyError,
)
self.check_result(
"label range", "loc", 20, "loc", 20, typs=["labels"], fails=TypeError
)
self.check_result(
"label range", "loc", 20, "loc", 20, typs=["ts"], axes=0, fails=TypeError
)
self.check_result(
"label range", "loc", 20, "loc", 20, typs=["floats"], axes=0, fails=KeyError
)
self.check_result("loc", 20, "ix", 20, typs=["labels"], fails=TypeError)
self.check_result("loc", 20, "ix", 20, typs=["ts"], axes=0, fails=TypeError)
self.check_result("loc", 20, "ix", 20, typs=["floats"], axes=0, fails=KeyError)
self.check_result("loc", 20, "loc", 20, typs=["labels"], fails=TypeError)
self.check_result("loc", 20, "loc", 20, typs=["ts"], axes=0, fails=TypeError)
self.check_result("loc", 20, "loc", 20, typs=["floats"], axes=0, fails=KeyError)

def test_loc_getitem_label_list(self):
# TODO: test something here?
# list of labels
pass

def test_loc_getitem_label_list_with_missing(self):
self.check_result(
"list lbl",
"loc",
[0, 1, 2],
"loc",
[0, 1, 2],
typs=["empty"],
fails=KeyError,
"loc", [0, 1, 2], "loc", [0, 1, 2], typs=["empty"], fails=KeyError,
)
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
self.check_result(
Expand Down Expand Up @@ -214,12 +188,15 @@ def test_loc_getitem_label_list_fails(self):
)

def test_loc_getitem_label_array_like(self):
# TODO: test something?
# array like
pass

def test_loc_getitem_bool(self):
# boolean indexers
pass
b = [True, False, True, False]

self.check_result("loc", b, "loc", b, typs=["empty"], fails=IndexError)

@pytest.mark.parametrize("index", [[True, False], [True, False, True, False]])
def test_loc_getitem_bool_diff_len(self, index):
Expand All @@ -232,6 +209,7 @@ def test_loc_getitem_bool_diff_len(self, index):
_ = s.loc[index]

def test_loc_getitem_int_slice(self):
# TODO: test something here?
pass

def test_loc_to_fail(self):
Expand Down Expand Up @@ -335,6 +313,25 @@ def test_loc_getitem_label_slice(self):

# GH 14316

self.check_result(
"loc",
slice(1, 3),
"loc",
slice(1, 3),
typs=["labels", "mixed", "empty", "ts", "floats"],
fails=TypeError,
)

self.check_result(
"loc",
slice("20130102", "20130104"),
"loc",
slice("20130102", "20130104"),
typs=["ts"],
axes=1,
fails=TypeError,
)

self.check_result(
"loc",
slice(2, 8),
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.