WORKFLOW
How To Extract Columns in a Dataset
Individual columns in a dataset can be extracted in order to be viewed or manipulated with Wolfram Language.
By Column Name...
Setup
Get a Dataset of animal weights from the Wolfram Data Repository:
Extract a column
Extract the “Species” column from the dataset:
![](Files/ExtractColumnsInADataset.en/1.png)
- The value returned is a Dataset object.
Extract a column as a List
To extract a column as a List, apply Normal:
![](Files/ExtractColumnsInADataset.en/2.png)
Extract multiple columns
Extract both the “Species” and “BodyWeight” columns from the dataset:
![](Files/ExtractColumnsInADataset.en/3.png)
By Column Index...
Setup
Get a Dataset of animal weights from the Wolfram Data Repository:
Extract a column
Extract the third column from the dataset:
![](Files/ExtractColumnsInADataset.en/4.png)
- The value returned is a Dataset object.
Extract a column as a List
To extract a column as a List, apply Normal:
![](Files/ExtractColumnsInADataset.en/5.png)
Extract multiple columns
Extract columns 1 and 3 from the dataset:
![](Files/ExtractColumnsInADataset.en/6.png)