import pandas as pd df = pd.DataFrame(dict(A=[1,1,2,2,3], B=[4,4,5,5,6])) def f(x): return x['A'] < 'taco' df.groupby('A').apply(f) Results in three exceptions stacked on top of each other. See below.
When it comes to working with data in a tabular form, most people reach for a spreadsheet. That’s not a bad choice: Microsoft Excel and similar programs are familiar and loaded with functionality for ...