PERF: Series.fillna (that is part of DataFrame) with inplace=True high memory usage / memory leaking #46149
Closed
2 of 3 tasks
Labels
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Performance
Memory or execution speed performance
Regression
Functionality that used to work in a prior pandas version
Milestone
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this issue exists on the latest version of pandas.
I have confirmed this issue exists on the main branch of pandas.
Reproducible Example
I have recently migrated from pandas
1.1.3
to pandas1.4.1
and I'm experiencing some memory-related issues. The code that used to work just fine is now crashing due to memory limitations.Reproducible example:
Interestingly enough, this snippet, which I would expect to have bigger memory requirements (as it's not inplace), works just fine:
The real code is obviously more complicated than the example, so I'd like to keep filling NA's column by column and doing this in place. Is that an unintended way of using
fillna
forDataFrame
'sSeries
or is it a bug?I don't have any memory profiling applied that I could share, but I can try making one if that's necessary. I've just noticed the code work in old pandas version and doesn't work in the new one, and I can see the memory usage in system's resource monitor.
Installed Versions
Prior Performance
In pandas 1.1.3 the first snippet works just fine.
Both snippets also seem to work incomparably faster on the older pandas version.
The text was updated successfully, but these errors were encountered: