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

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

https://www.nowcoder.com/practice/c177c9ad7ffd4503826f29d07ca71924

import pandas as pd
df= pd.read_csv('sales.csv')
sorted_df = df.sort_values(by='monetary',ascending=False,inplace=False,ignore_index=True)[:3]
# 设置pandas显示配置,以显示完整的数据框
pd.set_option("display.width", 300)  
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
print(sorted_df)

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-24 13:36
点赞 评论 收藏
分享
06-28 22:48
已编辑
广东金融学院 Java
小浪_Coding:学院本+这俩项目不是buff叠满了嘛
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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