हिंदी

Write a single line command to calculate 10% from ‘sale’ column from dataframe df and assign to new column ‘Commission’. -

Advertisements
Advertisements

प्रश्न

Write a single line command to calculate 10% from ‘sale’ column from dataframe df and assign to new column ‘Commission’.

विकल्प

  • df.insert[‘Commission’]=df.sale*10/100

  • df[‘Commission’]=df.sale*10/100

  • df.loc[‘Commission’]=df.sale*10/100

  • df[‘Commission’,axis=1]=df.sale*10/100

MCQ

उत्तर

df.insert[‘Commission’]=df.sale*10/100

shaalaa.com
DataFrame
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×