B
B
Bukkakeveron2017-10-25 19:05:03
JavaScript
Bukkakeveron, 2017-10-25 19:05:03

How to select names with the same transcriptions?

There is a pandas dataframe with two columns (see photo): the first is the names of people in English, the second is their phonetic transcription (using the nysiis dictionary). How can you select names with the same transcriptions from it?

names = pd.concat(pieces,ignore_index = True)
a=names['name'].unique()
b=list(a)
q=[]
for n in b:
    q.append(fuzzy.nysiis(n))
    
df=pd.DataFrame(b)
df1=pd.DataFrame(q)
w=df.join(df1, how='left', lsuffix='_left', rsuffix='_right')

59f0b5930fef2852372072.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-10-25
@LazyTalent

Try like this:
df[df.duplicated(['0_right'], keep=False)]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question