stefanuddenberg
1/30/2019 - 2:56 AM

Pandas -- Grouping data and getting means

# Get average responses for each face at each exposure time in each experiment (collapsing across subjects)
mean_ratings = data.groupby(['picN', 'ExpName', 'expTime']).agg("mean")

# What is the sum of durations, for calls only, to each network
data[data["item"] == "call"].groupby("network")["duration"].sum()