I have a column with addresses and want to find all rows that contain 'foreign' i.e. non-ASCII characters.
import pandas as pd
df = pd.DataFrame.from_dict({
'column_name': ["GREENLAND HOTEL, CENTRAL AVENUE, NAGPUR-440 018.", "Møllegade 1234567 DK-6400 Sønderborg Denmark"],
'column_other': ["0", "1"]
})
Expected output is it will display only the 2nd row which contains the "ø" character.
I tried this:
df['column_name'].str.isascii()
but in Python 3.6 at least this does not work.
In MySQL I can do this equivalent
SELECT * FROM `table_name` WHERE `column_name`!=CONVERT(`column_name` USING ASCII)
which works.