How would I use two columns as inputs to output a new column in pandas. For example how would I apply "some_function" in which Column A is the A input and Column B is the B input to create a new column E?
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randint(0,10,size=(6, 4)), columns=list('ABCD'))
def some_function(A, B):
if A > 5:
E = B - 7
if A <= 5:
E = B + 3
return E