Skip to main content
Tweeted twitter.com/#!/StackMma/status/497143302295404544
added 411 characters in body
Source Link

I created a dateset (estimates) with 25 keys (my columns), and about a hundred rows. I'd like to be able to list the keys from the dataset.

I did this:

estimates[Keys]

which returned:

enter image description here

I also tried:

estimates[1]

which returned:

enter image description here

How can I display the entire list of keys?

My code is below:

Module[
{fileTemp, header, data}, 
fileTemp = Import[NotebookDirectory[] <> "test.xlsx", {"Sheets", "estimates"}];
header = fileTemp[[1]];
data = fileTemp[[2 ;;]];
estimates = Dataset@Map[AssociationThread[header, #] &]@data;

]

The following is part of the Excel sheet:

enter image description here

I created a dateset (estimates) with 25 keys (my columns), and about a hundred rows. I'd like to be able to list the keys from the dataset.

I did this:

estimates[Keys]

which returned:

enter image description here

I also tried:

estimates[1]

which returned:

enter image description here

How can I display the entire list of keys?

I created a dateset (estimates) with 25 keys (my columns), and about a hundred rows. I'd like to be able to list the keys from the dataset.

I did this:

estimates[Keys]

which returned:

enter image description here

I also tried:

estimates[1]

which returned:

enter image description here

How can I display the entire list of keys?

My code is below:

Module[
{fileTemp, header, data}, 
fileTemp = Import[NotebookDirectory[] <> "test.xlsx", {"Sheets", "estimates"}];
header = fileTemp[[1]];
data = fileTemp[[2 ;;]];
estimates = Dataset@Map[AssociationThread[header, #] &]@data;

]

The following is part of the Excel sheet:

enter image description here

Source Link

Display ALL keys in dataset

I created a dateset (estimates) with 25 keys (my columns), and about a hundred rows. I'd like to be able to list the keys from the dataset.

I did this:

estimates[Keys]

which returned:

enter image description here

I also tried:

estimates[1]

which returned:

enter image description here

How can I display the entire list of keys?