0

On the below call, you can see that we are both accessing the data, but also changing it with two ix() calls.

test_df.ix[:, :] = scaler.transform(test_df.ix[:, :])

What would be the correct way of replacing those ix() calls with loc, and iloc?

I assume the first call to ix() would need to be replaced with iloc, and the second could be replaced with loc. What do you think?

Joquim
  • 21
  • 6
  • 1
    Related : [Using .loc or .iloc instead of .ix](https://stackoverflow.com/questions/49156877/using-loc-or-iloc-instead-of-ix) – anky Apr 04 '21 at 15:08
  • On the second call from ix(), loc() should work just fine. I am just not too confident about the first call to ix(), which should need to be replaced with iloc(). – Joquim Apr 04 '21 at 15:12

0 Answers0