题解 | #牛客网大佬之间的差距#
牛客网大佬之间的差距
https://www.nowcoder.com/practice/7487bcc22a0a487da941f357ab6b5d8e
import pandas as pd Nowcoder = pd.read_csv('Nowcoder.csv', sep=',') seven=Nowcoder[Nowcoder['Level']==7]['Achievement_value'] #print(int(max(seven)-min(seven)))#方法一:求出最大值最小值后作差 print(seven.values.ptp())#方法二:numpy.ptp()是计算最大值与最小值差的函数