I am trying to create a custom DataFrame.describe() function that will return
- numpy statistics
- scipy statistics
- quantiles from some source
This should reproduce my issue
# Python 3.6.6, Pandas 0.22.0
import pandas as pd
import numpy as np
import scipy.stats as sc
d = pd.DataFrame(np.random.randint(0,10, size=100000))
d.apply(np.mean) #Works
d.apply(np.std) #Works
d.apply(sc.kurtosis) #Works
d.apply([np.mean, np.std]) #Works
d.apply([np.mean, sc.kurtosis]) # Gets stuck
It runs forever if I include the scipy functions, but finishes very quickly if I only use numpy. If there is a better way to mimic the output of pd.DataFrame.describe() with my own custom list of statistical output I am open to that too.