[Solved] Write the command using insert( ) function to add a new column in the last place ( 3rd place ) named “Salary” from the list Sal=[ 10000,15000,20000] in an existing dataframe named EMP already having 2 columns.

   RSS

1
Topic starter

Write the command using insert( ) function to add a new column in the last place ( 3rd place ) named “Salary” from the list Sal=[ 10000,15000,20000] in an existing dataframe named EMP already having 2 columns.

1 Answer
1
Topic starter
EMP = EMP.insert(column="Salary", value=sal, loc=3)