Skip to content
Advertisement

Tag: multiplication

Mutiplying dataframe by -1 loses data

I have an issue and I have no idea what is causing it.. I have a very very simply dataframe which looks like the following; I simply need to convert this dataframe to positive numbers. When I do this with a simple; A column multiples but the B column loses its’ data to the following; I assume this is something

two conditions multiplication in pandas

I have the following dataframe, and I am trying to get revenue column by a multiplication between columnA or columnB and columnC. The condition is: if columnB is NaN, then the revenue column = columnA * columnC if columnB is not NaN, then the revenue column = columnB * columnC how do I get this revenue column with these two

multiplication game python

I am supposed to write a program in python that asks the user how many multiplication questions they want, and it randomly gives them questions with values from 1 to 10. Then it spits out the percentage they got correct. My code keeps repeating the same set of numbers and it also doesn’t stop at the number the user asked

Advertisement