I have a pandas Data Frame from a Excel File as Input in my program.
I would like to replace some non ASCII characters in the pandas Data Frame.
import pandas as pd XList=['Meßi','Ürik'] YList=['01.01.1970','01.01.1990'] df = pd.DataFrame({'X':XList, 'Y':YList}) X Y 0 Meßi 01.01.1970 1 Ürik 01.01.1990 I would like to create some replace rules: eg. ß->ss and Ü->UE
and get this:
X Y 0 Messi 01.01.1970 1 UErik 01.01.1990 Note: Im using Python 2.7
UPDATE:
Solved using the answer below and setting up by Eclipse following:
1°: Changing Text file encoding in Eclipe to UTF-8.
How to: How to use Special Chars in Java/Eclipse
2°: Adding to the first line command
# -*- coding: UTF-8 -*-