Pandas dataframe: set_index with inplace=True returns a NoneType, why?
Ok, now I understand, thanks for the comments!
So inplace=True should return None and make the change in the original object. It seemed that on listing the dataframe again, no changes were present.
But of course I should not have assigned the return value to the dataframe, i.e.
testDataframe = testDataframe.set_index(['Codering'], inplace=True)
should just be
testDataframe.set_index(['Codering'], inplace=True)
or
testDataframe = testDataframe.set_index(['Codering'], inplace=False)
otherwise the return value of the inplace index change (None) is the new content of the dataframe which is of course not the intend.
I am sure this is obvious to many and now it is to me as well but it wasn't without your help, thanks!!!