data1 = np.array(['Free (A, B, KR, FR), 5% (JP)',
    'Free (A, B, FR), 5% (JP, KR))'])
data2 = np.array(['10101010', '10101020'])
df = []
for i, element in enumerate(data1):
    free, five = element.lstrip('Free (').rstrip(')').split('), 5% (')
for country in free.split(', '):
    row = [data2[i], 'Free', country]
df.append(row)
for country in five.split(', '):
    row = [data2[i], '5%', country]
df.append(row)
df = pd.DataFrame(df, columns=['hscode', 'tariff', 'country'])
print(df.query('country == "KR"'))
Regular expression to filter desired rows from pandas dataframe