def regularit(df):
newDataFrame = pd.DataFrame(index=df.index)
columns = df.columns.tolist()
for c in columns:
d = df[c]
MAX = d.max()
MIN = d.min()
newDataFrame[c] = ((d - MIN) / (MAX - MIN)).tolist()
return newDataFrame
感谢@Noob Ting 的提醒,已更正