Unexpected output from pandas' DataFrameGroupBy.diff function
Consider the following piece of python code, which is essentially copied from the first code insert in the Transformation section of pandas‘ user guide’s Group by: split-apply-combine chapter. import pandas as pd import numpy as np speeds = pd.DataFrame( data = {‘class’: [‘bird’, ‘bird’, ‘mammal’, ‘mammal’, ‘mammal’], ‘order’: [‘Falconiformes’, ‘Psittaciformes’, ‘Carnivora’, ‘Primates’, ‘Carnivora’], ‘max_speed’: [389.0,… Read More Unexpected output from pandas' DataFrameGroupBy.diff function