We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
numfocus
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the master branch of pandas.
import pandas as pd import os import subprocess df = pd.DataFrame(data={'col': [0] * 1000}) while True: for i in range(10000): df.copy() cmd = f'ps --no-headers -e -o rss -q {os.getpid()}'.split() rss = int(subprocess.check_output(cmd)) print(f'{rss = }')
The resident set size (rss) keeps growing with this example which uses DataFrame.copy even though memory should be constant.
The memory should be constant.
$ python3.10 -c 'import pandas; pandas.show_versions()' INSTALLED VERSIONS ------------------ commit : 66e3805b8cabe977f40c05259cc3fcf7ead5687d python : 3.10.0.final.0 python-bits : 64 OS : Linux OS-release : 5.15.6-arch2-1 Version : #1 SMP PREEMPT Thu, 02 Dec 2021 15:47:09 +0000 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.3.5 numpy : 1.21.3 pytz : 2021.3 dateutil : 2.8.2 pip : 21.3.1 setuptools : 57.4.0 Cython : None pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 3.0.2 IPython : None pandas_datareader: None bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : 3.4.3 numexpr : 2.7.3 odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pyxlsb : None s3fs : None scipy : 1.7.3 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : None
The text was updated successfully, but these errors were encountered:
see #2659
Sorry, something went wrong.
pls don't open any more issues about this these are all #2659
@jreback gotcha, thanks. Should I close mine as duplicates?
@danr yes thanks
this is a perniscous issue and calling malloc_trim seems to work (or using jemalloc)
@jreback great, reading the workarounds in the issue you linked to. Thanks!
No branches or pull requests
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the master branch of pandas.
Reproducible Example
Issue Description
The resident set size (rss) keeps growing with this example which uses DataFrame.copy even though memory should be constant.
Expected Behavior
The memory should be constant.
Installed Versions
The text was updated successfully, but these errors were encountered: