In Julia, how iterate over Dataframe columns and names?

Viewed 87

You can iterate over the columns with:

for c in eachcol(dataframe)
   ...
end

where c is the vector of values in that column.

How can I iterate and get both the name of the column and the values in that column?

1 Answers
for (name, col) in pairs(eachcol(dataframe))
    ...
end
Related