English

Which one is the incorrect option to add a new column using insert() in the last place(3rd place) named “Salary” from the list Sal=[10000,15000,20000] -

Advertisements
Advertisements

Question

Which one is the incorrect option to add a new column using insert() 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?

Options

  • EMP.insert(loc=2,column=“Salary”,value=Sal)

  • EMP.insert(2,“Salary”,Sal)

  • EMP.insert(loc=2,column=“Salary”,value=[10000,15000,20000])

  • EMP.insert(loc=2,col=“Salary”,value=Sal)

MCQ

Solution

EMP.insert(loc=2,col=“Salary”,value=Sal)

shaalaa.com
DataFrame
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×