Skip to content
Advertisement

Tag: exponent

How do I square a column from an Excel file with pandas?

I’ve read an Excel file into python using: and I’m trying to square the columns using: I keep getting the error: I’m fairly new to python. Is there any way to easily fix this? Answer Never use apply-lambda for straightforward mathematical operations it is orders of magnitude slower than using direct operations. The problem that click004 is having is that

Efficient way for checking number 3^x * 5^y

I want to check if number, based on lower and upper bound, has prime divisors only 3 and 5 and number should be multiplication of power of 3 and power of 5. My current solution is this. I want to optimize it, since checking powers with for loops isn’t good way in my opinion. Thanks in advance. Based on comments

Advertisement