Skip to content

Commit 89c5ce9

Browse files
committed
DEPR: deprecate .ix in favor of .loc/.iloc
closes pandas-dev#14218
1 parent c71f214 commit 89c5ce9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/core/indexing.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=W0223
22

3+
import warnings
34
import numpy as np
45
from pandas.compat import range, zip
56
import pandas.compat as compat
@@ -1279,6 +1280,14 @@ class _IXIndexer(_NDFrameIndexer):
12791280
12801281
"""
12811282

1283+
def __init__(self, obj, name):
1284+
warnings.warn(".ix is deprecated. Please use\n"
1285+
".loc for label based indexing or\n"
1286+
".iloc for positional indexing\n",
1287+
FutureWarning, stacklevel=3)
1288+
1289+
super(_IXIndexer, self).__init__(obj, name)
1290+
12821291
def _has_valid_type(self, key, axis):
12831292
if isinstance(key, slice):
12841293
return True

0 commit comments

Comments
 (0)