I am trying to calculate the following formula:
I wrote this to calulate this:
%%timeit df = pd.DataFram