I have two pandas DataFrames. idxs has indices with multiple y values for each x. I also have an 0-filled matrix called mat
idxs
y
x
mat