我需要在jupyter笔记本(Python 3)中免费释放数组和数据帧内存吗?

发布于 2025-01-31 10:33:25 字数 224 浏览 0 评论 0原文

我是否必须像C和C ++一样手动免费的阵列和数据框?

我目前正在使用CSV中的大约100〜300 MB进行大型阵列(数千*)。 我正在使用Jupyter笔记本(Pythons3)进行正常化和其他数据处理,并运行了数百次我的代码。 我是Python的新手,直到我最近才想到可能正在发生内存泄漏。 (我没有任何错误)

我在gc.collect()上有了一些阅读,但很难理解。

感谢任何帮助,谢谢!

Do I have to manually free arrays and dataframes as in C and C++?

I'm currently working on large arrays (thousands*thousands) with about 100~300 MB in csv.
I'm using Jupyter notebook (pythons3) to do normalizations and other data handling, and have run my codes hundreds of times.
I'm new to python, and it only recently occurred to me that memory leak might be happening. (I'm not having any errors)

I've read up a bit on gc.collect() but had trouble understanding.

Any help is appreciated, thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文