pandas把所有大于0的数设置为1

来源:互联网 发布:linux c一站式编程pdf 编辑:程序博客网 时间:2024/05/16 15:41

df = pd.read_csv(‘hahaha.csv’)
df[df>0] = 1
print(df)

阅读全文
0 0
原创粉丝点击