Any problem with this code?

Screen Link:

My Code:

Replace this line with your code

What I expected to happen:

What actually happened:

Replace this line with the output/error

autos.columns = autos.rename(columns={‘yearOfRegistration’:‘registration_year’,‘monthOfRegistration’:‘registration_month’,‘notRepairedDamage’:‘unrepaired_damage’,‘dateCreated’:‘ad_created’},inplace=True)

Since you are using inplace you don’t need to assign it to a new variable. This would work:

autos.rename(columns={'yearOfRegistration':'registration_year','monthOfRegistration':'registration_month','notRepairedDamage':'unrepaired_damage','dateCreated':'ad_created'}, inplace=True)

Yes there is a very huge problem. pd.DataFrame.rename() returns a dataframe



With inplace=True it will alter the dataframe hence no need to assign it to a variable.

some problem with the code herer
autos = pd.read_csv(‘autos.csv’,‘Latin-1’,‘windows-1252’)
Users/shine/opt/anaconda3/lib/python3.7/site-packages/ ParserWarning: Falling back to the ‘python’ engine because the ‘c’ engine does not support regex separators (separators > 1 char and different from ‘\s+’ are interpreted as regex); you can avoid this warning by specifying engine=‘python’.
“”"Entry point for launching an IPython kernel.