Informatics Practices
What are binary operations ? Name the functions that let you perform binary operations on a DataFrame.
Python Pandas
5 Likes
Answer
Binary operations refer to operations that require two values to perform and these values are picked element-wise. In a binary operation involving DataFrames, the data from the two DataFrames are aligned based on their row and column indexes. For matching row and column indexes, the specified operation is performed, while for non-matching row and column indexes, NaN values are stored in the result. The functions that perform binary operations on a DataFrame include add(), radd(), sub(), rsub(), mul(), div(), and rdiv().
Answered By
1 Like