i have a dataframe df with 1 row and 20 columns:
id name age...... And so on
1 Ian 29......
I also have a list L
L = ['Doctor', 'Carpenter']
I want to create a column 'Occupation' in my dataframe such that, all the other column values remain same.
Final output required:
id name age...... Occupation
1 Ian 29...... Doctor
1 Ian 29...... Carpenter
I was trying to iterate the list and then use pd.concat to append two slices.
Is there a better way to do it?