What I am trying to do is to add columns titles into my data set that has unit information.
First I create a list of countries:
Countries = {"UnitedStates", "Mexico", "Canada", "Brazil","Argentina", "Peru", "Ecuador", "CostaRica", "ElSalvador"}
Then I compute for each country the population using CountryData
.
populations = CountryData[#, "Population"] & /@ Countries
Now I proceed to create and association and then then data set.
dat = Dataset[AssociationThread[Countries -> populations]]
But when I try to add names to columns using dat[All, <|"1" -> "Country", "2" -> "Population"|>]
I get this error.