Python Forum

Full Version: Big chunck of memory using pandas loc
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?