无法获得所需的结果:
我有一个数据框:
df1 = pd.DataFrame({"Address":['1024 FRANCIS CIRC', '2077 JOHNSON CLF', '1099 S ARLINGTON RDGE ROAD']})
我有第二个数据框:
df2 = pd.DataFrame({"Address_Type":['CIRCLE','CIRCLE','CLIFF','RIDGE','RIDGE'],
"Abbreviation":['CIR','CIRC','CLF','RDG','RDGE']})
我想在df2.Address的缩写中搜索字符串,如果找到,将其更改为df2.Address_Type中的相应字符串。
我希望看到的结果是:
df1 = pd.DataFrame("Address":['1024 FRANCIS CIRCLE', '2077 JOHNSON CLIFF', '1099 S ARLINGTON RIDGE ROAD']})
曾经尝试过lambda函数和带函数调用的lambda函数,但是没有雪茄。
答案 0 :(得分:0)
尝试一下:
FROM dbo.student AS student
INNER JOIN dbo.college AS college ON student.id = college.student_id
INNER JOIN dbo.class AS clazz ON student.id = clazz.student_id