Python Forum
Big chunck of memory using pandas loc - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Big chunck of memory using pandas loc (/thread-12403.html)



Big chunck of memory using pandas loc - mr_byte31 - Aug-23-2018

Hi All,

I created a script to save information from internet into pandas dataframe and later I save it in CSV file.

First I create an empty pd using :
result = pd.DataFrame(index = df_CSV['Ticker'], columns = keyStatistics)
later in the code, I start to modify each element inside a loop using
result.loc[ticker,keyStatistics[i]]= td.string
I noticed that the program is taking more than 1G in memory and keep increasing with time.

is there any memory leaks inside the panda loc method?