QIAN Weishuo thinks this is interesting: aggregating function From There's more... from Pandas Cookbook by Theodore Petrou Publisher: Packt Publishing Released: October 2017 Note n -> 1 的函数才是聚合函数 把非聚合函数硬塞进agg()里面，会报ValueError Share this highlight http://www.safaribooksonline.com/a/pandas-cookbook/11833379/ Twitter Facebook Google Plus Email Get Instant Access Now Start a Free Trial Learn about Safari for Business Have an account? Sign in. Minimise Unlock the rest of Pandas Cookbook and 30,000 other books and videos By clicking this box, you confirm that you have read and agree to the terms and conditions of our Membership Agreement, and you understand that when your trial period ends, you will be required to provide billing information if you wish to continue using the service. Unlock the rest of this book Start a Free 10-Day Trial loading Learn about Safari for Business Have an account? Sign in.