【发布时间】:2022-11-16 04:33:33
【问题描述】:
我需要你的帮助在 Python 上使用 Pandas。
我必须通过显示该列的值小于该列的平均值的所有行来过滤具有最唯一值的数字列上的数据集行。
我该如何解决这个问题?
def pandasFilter(filePath):
df1 = pd.read_csv(filePath) #creating a dataframe
nd = df1.select_dtypes("number") #only selecting the numeric columns
v_i = nd.nunique() #sorting unique values of the numeric columns
是我的脚步
【问题讨论】: