close

[Solved] AttributeError: ‘DataFrame’ object has no attribute ‘ix’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error AttributeError: ‘DataFrame’ object has no attribute ‘ix’ in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How AttributeError: ‘DataFrame’ object has no attribute ‘ix’ Error Occurs?

Today I get the following error AttributeError: ‘DataFrame’ object has no attribute ‘ix’ in Python.

How To Solve AttributeError: ‘DataFrame’ object has no attribute ‘ix’ Error ?

  1. How To Solve AttributeError: 'DataFrame' object has no attribute 'ix' Error ?

    To Solve AttributeError: 'DataFrame' object has no attribute 'ix' Error try df.iloc[:, integer] .ix is deprecated By the way, df.loc[:,'col_header'] is for str or Boolean indexing

Solution 1

try df.iloc[:, integer]

.ix is deprecated

By the way, df.loc[:,'col_header'] is for str or Boolean indexing

Solution 2

A fresh install today (Jan 30, 2020) would install pd.__version__ == '1.0.0'. With that comes a removal of many deprecated features.

Removed Series.ix and DataFrame.ix (GH26438)

Solution 3

Change .ix to .loc and it should work correctly.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment