Extract value from single row of pandas DataFrame
If you want just the value and not a df/series then call values
and index the first element [0]
so just:
price = purchase_group['Column_name'].values[0]
will work.
If purchase_group
has single row then doing purchase_group = purchase_group.squeeze()
would make it into a series so you could simply call purchase_group['Column_name']
to get your values