我知道我可以替换所有的nan值df.fillna(0)并替换单个值df.replace('-',1),但是如何用单个值替换所有非零值?
df.fillna(0)
df.replace('-',1)
python pandas
pandas ×1
python ×1