Skip to content

Commit 47dd59b

Browse files
authored
Update _get_column_info()
Series.__getitem__ treating keys as positions is deprecated. See: https://github.com/pandas-dev/pandas/blob/2.1.x/pandas/core/series.py#L1027-L1037
1 parent 97fb1fe commit 47dd59b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ISLP/models/columns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _get_column_info(X,
148148
name = f'X{col}'
149149
else:
150150
name = str(col)
151-
if is_categorical[i]:
151+
if is_categorical.iloc[i]:
152152
if is_ordinal[i]:
153153
Xcol = _get_column(col, X)
154154
encoder = clone(default_encoders['ordinal'])

0 commit comments

Comments
 (0)