题解 | #某店铺消费最多的前三名用户#

某店铺消费最多的前三名用户

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)

全部评论

相关推荐

ming_ri:后端依旧稳定发挥
点赞 评论 收藏
分享
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务