I have a very large dataframe (23 million rows) that I’m processing by groups and I get this memory error through Spyder 5.5.
for key, val in df.groupby(['SN','SW']):
val = val.sort_values(['SN', 'DT'])
MemoryError: Unable to allocate 176. MiB for an array with shape (66, 349708) and data type object
PC has 32 GB RAM. How can I allocate more memory to Python/Spyder?