So far I used this line of code here:
max_total_gross = event_data[\"max_total_gross\"].loc[event_data[\"event_id\"] == event_id].item()
Si
The method item() is still useful if you want to assert that the Series has length exactly 1, and also get that single value at the same time. I recommend replacing:
item()
result = ser.item()
with:
result = ser.values.item()
which should do what you want.