KnowledgeBoat Logo
|

Informatics Practices

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

  1. sub
  2. difference
  3. minus
  4. rsub

Python Pandas

3 Likes

Answer

sub, rsub

Reason — We can subtract two DataFrame objects using either (-) operator or using sub() function as per syntax : <DF1>.sub(<DF2>) which means <DF1>-<DF2> or by using rsub() function i.e., reverse subtract as per syntax : <DF1>.rsub(<DF2>) which means <DF2>-<DF1>.

Answered By

2 Likes


Related Questions