Create Duplicate Column In Pandas Dataframe
I want to duplicate a column which has numerical character in the start position. ie(1stfloor) In simple term, I want to convert column 1stfloor to FirstFloor df 1stfloor 4
Solution 1:
df['FirstFloor'] = df['1stfloor']
df['FirstFloor'] = df.loc[:, '1stfloor']
Both worked!
Post a Comment for "Create Duplicate Column In Pandas Dataframe"