Iterating a dataframe and adding one column as a key and the other as value #427
Unanswered
Oceanestars
asked this question in
Q&A
Replies: 1 comment
-
|
@Oceanestars Is your index numeric or string? And also if you need just the first row, you can do |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm struggling to migrate from pandas to danfo.
I'm trying to just get the left column to be key of a dictionary and right column to be values.
Here I'm getting the correct data frame with the right data but when I'm trying to just select the first-row title It's not working. So I tried to go back even a step before where I could just get the column and all the titles of that column. Ideally, I can iterate through the title column of the 5 rows and make each value be the key to a dictionary but I'm not able to iterate through the data frame. Any help is greatly appreciated!!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions