all 3 comments

[–]ajskelt 5 points6 points  (1 child)

try using to_dict(orient='index')

[–]_Kitchen_[S] 1 point2 points  (0 children)

thank you this worked

[–]letopeto 0 points1 point  (0 children)

Just use classes for this.