10.11 Drop Columns
20240811
By dropping columns from your dataset you can reduce the amount of memory taken up by your dataset, especially for very large datasets.
As an example, suppose we have loaded a dataset using the dataset
template or withing Rattle (so the dataset name is ds
) Here we use
the audit dataset from Rattle. We can use the
object.size()
function to determine the current amount of memory the dataset is
taking up:
Within Rattle can select variables in the Dataset tab’s Roles page to be Ignored. we might choose to Ignore age, employment, education, marital, and occupation. In the Transform tab choose the Cleanup feature. Running the Delete Ignored function will remove the columns that we marked as Ignored. Now in the Console we can check how much space the dataset is now taking up:
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0