To apply custom functions with groupby() in pandas, you can use either the apply() method or the agg() method.