Aug-25-2023, 04:59 PM
Greetings!
I need to rename Columns in the Dataframe. I found if the name has a space my script is failing.
I tried a lot of examples from the Net and nothing is working for some reason. Column Names are staying the same.
here is a "renaming" snippet:
I need to rename Columns in the Dataframe. I found if the name has a space my script is failing.
I tried a lot of examples from the Net and nothing is working for some reason. Column Names are staying the same.
here is a "renaming" snippet:
exlf = pd.read_excel('C:/01/XLS_Files/SHORT.xlsx', keep_default_na=False) exlf = exlf.rename(columns={"Visual ID": "Visual_ID","VR Duration(Days)": "VR_D"}) print(exlf)Thank you.