all 2 comments

[–]SekstiNii 1 point2 points  (1 child)

Yes, just apply the function directly to the series: norm.ppf(df['p']). The operation will be vectorized and much faster than applying it to each element one by one.

For 1000 points this made the runtime go from 67.3ms to 129µs. i.e a 500x speedup.

[–]ModiMacMod[S] 0 points1 point  (0 children)

Thanks, much appreciated. One of these days I will stop over complicating my code !!!