Pandas GroupBy memory deallocation

前端 未结 2 920
孤独总比滥情好
孤独总比滥情好 2021-02-07 04:28

Problem

I noticed that memory allocated while iterating through a Pandas GroupBy object is not deallocated after iteration. I use resource.getrusage(resource.RUSA

2条回答
  •  余生分开走
    2021-02-07 04:53

    Memory Weirdness

    This is very interesting! You do not need del idx, x. Only using gc.collect() worked to keep memory constant for me. This is much cleaner that having the del statements inside the loop.

提交回复
热议问题