A collection of Python3 utilities for personal and professional use.
pip install git+https://github.com/ddelange/PyArmyKnife.git@master
import numpy as np
import pandas as pd
import pyarmyknife as pak
# parralel_apply method
pak.parallel.patch_pandas()
help(pd.DataFrame.parallel_apply)
df = pd.DataFrame(np.random.randint(0, 300, size=(int(100000), 3)), columns=list("ABC"))
df["totals"] = df.parallel_apply(sum, axis=1, progressbar=False)
df.parallel_apply(sum)
# All sorts of other fun stuff
pp = pak.misc.pp() # pretty printer: pp(list(range(100)))
t = pak.misc.set_trace # ipdb: t()