import pandas as pd
data = {'name': ['HelloWorld', 'ByeWorld'],
'physics': [22, 33],
'chemistry': [44, 55]}
a = pd.DataFrame(data)
b = a.loc[a['name'] == 'Hello']
print(b)
This code would not return any rows, but I would like to achieve it would return the first row, because it includes "Hello". Is there any elegant solution to solve this with the loc command?