I'm trying to achieve this in pandas:
df['X'] = df['C'].where(row is <= current row).sum()
df['Y'] = df['C'].where(row is >= current row).sum()
What is the right syntax to make pandas sum the data from column C that are above or equal to the current row?