我的数据框的值为Na,blank等,我想将Na替换为noted(其他字符串值)我想在不更改空白单元格的情况下将from here转换为here。
我已经尝试过
'''df['A']=df['A'].replace(regex=['NaN'], value='needed')'''
和
''' df['A'].replace(regex=['NA'], value='noted''''
您可以使用fillna():
fillna()