题解 | #某店铺消费最多的前三名用户#
某店铺消费最多的前三名用户
https://www.nowcoder.com/practice/c177c9ad7ffd4503826f29d07ca71924
import pandas as pd
import datetime as dt
sale = pd.read_csv("sales.csv", sep=",")
pd.set_option("display.width", 300) # 设置字符显示宽度
pd.set_option("display.max_rows", None) # 设置显示最大行
pd.set_option("display.max_columns", None)
top3=sale.sort_values('monetary',ascending=True).head(3)
top3.reset_index(drop=True,inplace=True)
print(top3)
查看12道真题和解析