我觉得这个题非常典型,所以
3.返回下表中所有同学语文成绩最低的1次考试成绩 chinese english math name test 75 69 36 张三 一 68 85 87 李四 一 54 42 59 王五 一 55 57 63 李四 二 59 35 92 王五 二 45 63 92 王五 三 61 53 76 赵六 一** import pandas as pd df = pd.read_table('5.class.csv', encoding='gbk’) def top(x, n=1, column='chinese'): return x.sort_values(by=column)[:1] df.groupby('name').apply(top)
思考问题:用sql怎么写呢?
select max(), .... from .... group by name ...