CBSE Class 12 Informatics Practices Question 29 of 101

Python Pandas — II — Question 5

Back to all questions
5
Question

Question 5

To divide the values of two DataFrames, ............... function may be used.

  1. divide
  2. div
  3. rdiv
  4. division
Answer

div, rdiv

Reason — We can divide two DataFrame objects using either (/) operator or using div() function as per syntax : <DF1>.div(<DF2>) which means <DF1>/<DF2> or by using rdiv() function i.e., reverse division as per syntax : <DF1>.rdiv(<DF2>) which means <DF2>/<DF1>.