Machine Learning, Data Science, Technology, Python, Data Engineering.
We can use vaex to perform the same function as we do for pandas. # Create a categorical column that determines if x is positive or negative df['x_sign'] = df['x'] > 0 # Create an aggregation based on x_sign to get y's mean and z's min and max. df.groupby(by='x_sign').agg({'y': 'mean', 'z': ['min',