Not the most elegant perhaps, but here is one solution:
For df:
Full Partial
0 ABCDEFGHIJKLMNOPQRSTUVWXYZ FGHIJKL
1 ANLHDFKNADHFBAKHFGBAKJFB FKNADH
2 JABFKADFNADKHFBADHBFJDHFBADF ABFKA
This:
df.apply(lambda r: r.Full.lower().replace(r.Partial.lower(), '_' + r.Partial + '_'), axis=1)
Returns:
0 abcde_FGHIJKL_mnopqrstuvwxyz
1 anlhd_FKNADH_fbakhfgbakjfb
2 j_ABFKA_dfnadkhfbadhbfjdhfbadf
For each row, you convert the full string to lowercase, and replace the 'partial string to lower' with the original partial string with two underscores added on both sides.