Slice
Slice
helps you clean and explore your data taking a large dataset and slicing it into multiple datasets based on the values of the target column. For example, if you slice a dataset using the column Month, which contains one value for every month, you’ll end up with 12 datasets, one for each month.
Format
Slice
uses a single format: Slice <dataset> creating a new dataset for each <column name> with a table limit of <limit>
.
Parameters
Slice
uses the following parameters:
Dataset
. The dataset to slice.Column name
. The column whose values to use when slicing.Limit
. The maximum number of datasets to create. For example, if the column you’re using to slice the dataset has 10 values and you want to create only five new datasets
Output
If the dataset is successfully sliced, a success message appears in the conversation history and a summary table is shown in the Data tab showing your original dataset and each of the resulting datasets. You can then either click the dataset’s name in that table or run the Use skill to switch the focus to one of the new datasets.
Otherwise, an error message is shown.
Examples
Consider a dataset called “Titanic” that contains information on each passenger, including the following columns:
- Age. Their age.
- Gender. Their gender.
- Name. Their name.
- PClass. Their class.
- Survived. Whether they survived the disaster.
To split the Titanic dataset into two datasets, one containing passengers who survived and the other containing those that didn’t, enter Slice the dataset Titanic creating a new dataset for each Survived
.
To split the Titanic dataset into three datasets, one for each passenger class, enter Slice the dataset Titanic creating a new dataset for each PClass
.