pandas get attribute of object code example
Example: pandas get attribute of object
from operator import itemgetter
df['location'].apply(itemgetter('country'))
from operator import itemgetter
df['location'].apply(itemgetter('country'))