I know that this kind of question was asked before and I\'ve checked all the answers and I have tried several times to find a solution but in vain. In fact I call a Datafra
Check your DataFrame with data.columns
data.columns
It should print something like this
Index([u'regiment', u'company', u'name',u'postTestScore'], dtype='object')
Check for hidden white spaces..Then you can rename with
data = data.rename(columns={'Number ': 'Number'})