MiracleTony
V2EX  ›  Python

Dataframe 计算性能好慢

By MiracleTony at 2018 年 8 月 13 日 · 2788 次点击

我用两个 3000*1 的 dataframe 相减 需要耗费 1-3s 的时间,太慢了,有没有什么解决方法

4 条回复
neosfung
   1
neosfung  
   2018 年 8 月 13 日
dask ?
bigtan
   2
bigtan  
   2018 年 8 月 13 日
你的用法有问题吧 代码贴出来
MiracleTony
   3
MiracleTony  
OP
   2018 年 8 月 13 日
DiffFrame = preFrame - postFrame
就很简单的两个 dataframe 相减呀, 大小是 3000*1 的,竟然要用 1 秒多
billgreen1
   4
billgreen1  
   2018 年 8 月 13 日
@MiracleTony 给一个可重复的例子
推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
© 2026 V2EX · 35ms · 3.9.8.5