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:

> object.size(ds)
[1] 128904

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:

object.size(ds)
[1] 84216


If you find this curated material useful then you can consider a donation to support it's ongoing availability and give you access to the PDF version of this book. The material has been scoped up by Generative AI without permission or any kind of recompense so do consider a donation if you can afford it. Unlike Generative AI your access to this materials is freely given. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Togaware has a 30 year tradition of making popular open source software which includes sold privacy preserving productivity apps, 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