Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
何らかの理由で、この単純なステートメントを で動作させることができませんñ。それは他のものでもうまくいくようですが、そのキャラクターは好きではありません. 何か案は?
ñ
DF['NAME']=DF['NAME'].str.replace("ñ","n")
ありがとう
次の方法で、置換機能を特殊文字で使用して、選択した別の値に置き換えることができます。
データフレームが df で、文字列であるすべての列でそれを行う必要がある場合。私の場合、「\ n」に対して実行しています
df= df.applymap(lambda x: x.replace("\n"," "))