题解 | #某店铺消费最多的前三名用户#
某店铺消费最多的前三名用户
https://www.nowcoder.com/practice/c177c9ad7ffd4503826f29d07ca71924
import pandas as pd sales = pd.read_csv('sales.csv') print(sales.sort_values(by = ['monetary'],ascending = False).head(3).reset_index(drop=True)) # 注意重置索引