I have an electoral dataset (DS) where columns are states (st), districts (di), different parties (p1, p2, p3) and total votes (tot) like this (but much taller):
st d