When I execute this code, I get the error IndentationError: unindent does not match any outer indentation level
:
def calculate(num1, num2):
if (num1/num2 > 1):
num1 = num2
result = (num1 - num2) / math.sqrt(1-(num1/num2))
return result
df = udf(calculate, FloatType())
What am I doing wrong?