title: How to replace Swedish characters ä, å, ö in columns names in python?
body: <p>I have a dataframe with some columns names having Swedish characters (ö,ä,å). I would like to replace these characters with simple o,a,a instead. </p>
  
  <p>I tried to convert the columns names to str and replace the characters, it works but then it gets complicated if I want to assign back the str as columns names, i.e., there are multiple operations needed which makes it complicated.</p>
  
  <p>I tried the following code which replaces the Swedish characters in columns names with the English alphabets and returns the result as str.   </p>
  
  <pre><code>from unidecode import unidecode
  unicodedata.normalize('NFKD',str(df.columns).decode('utf-8')).encode('ascii', 'ignore')
  </code></pre>
  
  <p>Is there a way to use the returning str as columns names for the dataframe? If not, then is there a better way to replace the Swedish characters in columns names?</p>