application_vnd.jupyter.stderr_output_1.png
import pandas as pd

import re

import pandas as pd
import re
import numpy as np
train = pd.read_csv('/kaggle/input/titanic/train.csv')
test = pd.read_csv('/kaggle/input/titanic/test.csv')

suv = pd.read_csv('/kaggle/input/titanicscraper/src/kaggle/titanic/surv.csv')
vic = pd.read_csv('/kaggle/input/titanicscraper/src/kaggle/titanic/vict.csv')

suv['survived'] = 1
vic['survived'] = 0
ground_truth = pd.concat([suv, vic])
ground_truth['fsname'] = [re.search('^(.*?)( |$)', item).group(1) for item in ground_truth['given name']]

tmp_f = [item.encode('ascii', 'ignore').decode('ascii') for item in ground_truth['family name']]
non_ascii = [True if x != y else False for x, y in zip(tmp_f, ground_truth['family name'])]
ground_truth['uni_f'] = non_ascii
print('Non-ascii family names')
pd.value_counts(non_ascii)