Pandas, Machine Learning, Large Datasets, Data Analysis, Data Science.
data.astype(dtype={'payment_type':'category'}) >>> data.memory_usage() Index 128 income 8000000 current_address_months_count 8000000 customer_age 8000000 payment_type 1000212 You can see the memory usage of column payment_type drastically reduce after changing the datatype into the category. Rather