I have tried to string the column names and then change them -- no success, it left it NaN: data.rename(columns=str).rename(columns={'NaN':'Tip Analiza','NaN':'Limite' }, inplace=True) I tried to use the in function to replace NaN-- no success, it gave an error: data.columns = pd.Series([np.nan if 'Unnamed:' in x else x for x in data.columns.values]).ffill().values.flatten() TypeError: argument of type 'float' is not iterable What should I try? Continue reading...