rcet
import pandas as pd

data = [
    {&quot;voters&quot;: 7, &quot;rank&quot;: [&quot;A&quot;, &quot;B&quot;, &quot;C&quot;, &quot;D&quot;]},
    {&quot;voters&quot;: 5, &quot;rank&quot;: [&quot;B&quot;, &quot;C&quot;, &quot;D&quot;, &quot;A&quot;]},
    {&quot;voters&quot;: 6, &quot;rank&quot;: [&quot;D&quot;, &quot;B&quot;, &quot;C&quot;, &quot;A&quot;]},
    {&quot;voters&quot;: 4, &quot;rank&quot;: [&quot;C&quot;, &quot;D&quot;, &quot;A&quot;, &quot;B&quot;]}
]

df = pd.DataFrame(data)
df_borda = bord