Tweeted By @python_tip
Combine columns of #pandas #dataframe using groupby and a dictionary mapping
— Daily Python Tip (@python_tip) March 25, 2019
>>> df.groupby(mapping, axis=1).sum() pic.twitter.com/kvfdKAvBo8
Combine columns of #pandas #dataframe using groupby and a dictionary mapping
— Daily Python Tip (@python_tip) March 25, 2019
>>> df.groupby(mapping, axis=1).sum() pic.twitter.com/kvfdKAvBo8