df.mul vs df.rmul in Pandas

0 votes
What is the difference between df.mul and df.rmul? The documentation looks similar for both.
Jan 18 in Python by ana1504.k
• 7,890 points
182 views

1 answer to this question.

0 votes
The documentation is not identical. As stated in the documentation, df.mul(other) is equivalent to df * other, while df.rmul(other) is equivalent to other * df.

This probably doesn't matter for most cases, but it will matter if, e.g., you have a dataframe of object dtype whose elements have noncommutative multiplication.
answered Jan 18 by SDeb
• 13,210 points

Related Questions In Python

0 votes
1 answer

Pandas DataFrames in a loop, df.to_csv()

can you try something like this? not ...READ MORE

answered Sep 25, 2018 in Python by Priyaj
• 57,300 points
1,333 views
+2 votes
2 answers

How can I replace values with 'none' in a dataframe using pandas

Actually in later versions of pandas this ...READ MORE

answered Aug 13, 2018 in Python by bug_seeker
• 15,360 points
8,542 views
0 votes
1 answer

How can I reformat value_counts() analysis in Pandas for large number of columns?

If I were you, I'd do it ...READ MORE

answered Apr 17, 2018 in Python by anonymous
2,684 views
+1 vote
2 answers

Difference between append vs. extend list methods in Python

Python append() method adds an element to ...READ MORE

answered Aug 21 in Python by germyrinn
• 180 points
312 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 409 views
0 votes
1 answer

When to use file vs open in Python?

File() has been removed since Python 3.0 ...READ MORE

answered Oct 30, 2018 in Python by SDeb
• 13,210 points
35 views
0 votes
1 answer

Python Pandas: selecting element in array column

pa.loc[row] selects the row with label row. pa.loc[row, ...READ MORE

answered May 13 in Python by SDeb
• 13,210 points
79 views