Options
Optimizing Memory Usage in Python (Pandas)
ISSN
2667-9507
Date Issued
2024
Author(s)
Mantskava, Maka
Momtselidze, Nana
Publisher
Abstract
This article explores Python's prominence in Data Science, Data Analytics, and Machine Learning, attributing its widespread adoption to its user-friendly na-Machine Learning, attributing its widespread adoption to its user-friendly nature, robust online community, and powerful data-centric libraries such as Panture, robust online community, and powerful data-centric libraries such as Pandas, NumPy, and Matplotlib. It delves into the challenges of managing extensive das, NumPy, and Matplotlib. It delves into the challenges of managing extensive datasets and emphasizes the importance of memory utilization in navigating datasets and emphasizes the importance of memory utilization in navigating substantial data. The Pandas library's info() and memory_usage() methods are substantial data. The Pandas library's info() and memory_usage() methods are discussed as essential tools for assessing and optimizing dataframe memory con-discussed as essential tools for assessing and optimizing dataframe memory consumption. The article demonstrates how changing data types, particularly for sumption. The article demonstrates how changing data types, particularly for object columns, to the category datatype signifi cantly reduces memory usage object columns, to the category datatype signifi cantly reduces memory usage without altering the dataframe's appearance. The strategic adjustment of numer-without altering the dataframe's appearance. The strategic adjustment of numerical column data types based on value range, illustrated with the age column as ical column data types based on value range, illustrated with the age column as an example, is explored as a means of achieving precision and memory effi cien-an example, is explored as a means of achieving precision and memory effi ciency. The article highlights the considerable reduction in memory requirements cy. The article highlights the considerable reduction in memory requirements by transitioning from fl oat64 to fl oat16 for columns containing fl oating-point by transitioning from fl oat64 to fl oat16 for columns containing fl oating-point numbers. Overall, this comprehensive exploration provides valuable insights numbers. Overall, this comprehensive exploration provides valuable insights into effective strategies for memory optimization in Pandas dataframes, catering into effective strategies for memory optimization in Pandas dataframes, catering to both categorical and numerical data, contributing to enhanced computational to both categorical and numerical data, contributing to enhanced computational effi ciency and signifi cant memory savings.effi ciency and signifi cant memory savings.
File(s)
Loading...
Name
Optimizing Memory Usage in Python (Pandas).pdf
Size
2.17 MB
Format
Adobe PDF
Checksum
(MD5):98d9a8c5d2d86d54784b8bf578ad6ab6