TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Scaling Pandas: Comparing Dask, Ray, Modin, Vaex, and Rapids

92 pointsby FHMSalmost 5 years ago

10 comments

haltingproblemalmost 5 years ago
We need a better decomposition of scalability. Do you mean scalability in data or scalability in compute or scalability of both?<p>Definitions:<p>Scalability in Data (SD): doing fast computation on a <i>very</i> large number of rows<p>Scalability in compute (SC): doing slow computations on a large number of rows<p>For SD, I have found that a 16-32 core machine is more than enough for tens of billions of rows as long as your disk access is relatively fast (SSD vs. HDD). If you vectorize your compute operations you can typically get to within 10x the assembly compute time. This allows you to tap into in a 32 core machine for 10s of effective giga flops. These machines are rated at 100s of giga flops. For example I had to compute a metric on a 100 million row table (dataframe) which effectively required on the order of 10-20 tflops of compute. Single-core pandas was showing us 2 months of compute time. Using vectorization and using mp.Pool I was able to reduce to a few hours. The big win here was vectorization and not mp.Pool.<p>For Compute scalability - e.g. running multiple machine learning models which cannot be effectively limited to a single machine, nothing beats Dask. Dask is extremely mature, has seen a large number of real world cases and people have used it for hundreds of hours of uptime.<p>Vectorization is a oft unlooked realm of speedup which can easily give you 10-100x speedups in Pandas. Understanding vectorization and what it can and cannot do is a highly productive exercise.
sixhobbitsalmost 5 years ago
Oh, I wrote this :) I submitted it last week but it didn&#x27;t get much attention then.<p>Happy to answer questions as far as possible. I have used Pandas extensively but I don&#x27;t have deep experience with all of these libraries so I learnt a lot while summarising them.<p>If you know more than I do and I made any mistakes, let me know and I&#x27;ll get them corrected.
评论 #23742620 未加载
评论 #23742585 未加载
评论 #23742006 未加载
评论 #23744122 未加载
closedalmost 5 years ago
Articles like these are interesting, but what surprises me is that they rarely set up a holistic use case, so most debates imagine how long it would take an expert user to use each tool. But time constraints (eg spent coding) separates expert from novice performance in many domains.<p>FWIW I have 2020 set aside to implement siuba, a python port of the popular R library dplyr (siuba runs on top of pandas, but also can generate SQL). A huge source of inspiration has been screencasts by Dave Robinson using R to analyze data he&#x27;s never seen before lightning fast.<p>Has anyone seen similar screencasts with pandas? I suspect it&#x27;s not possible (given some constraints on its interface), but would love to be wrong here, because I&#x27;d like to keep all my work in python :o.<p>Expert R screencasts: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;NY0-IFet5AM" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;NY0-IFet5AM</a><p>Siuba: <a href="https:&#x2F;&#x2F;github.com&#x2F;machow&#x2F;siuba" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;machow&#x2F;siuba</a>
评论 #23742084 未加载
jzwinckalmost 5 years ago
The subtitle is &quot;How can you process more data quicker?&quot;<p>NumPy. It scores an A in Maturity and Popularity, and either an A or a B in Ease of Adoption depending on which Pandas features you use (e.g. GroupBy).<p>When you&#x27;re using NumPy as the main show instead of an implementation detail inside Pandas, it is easier to adopt Numba or Cython, and there are huge gains to be made there. Most Pandas workloads on small clusters of say 10 machines or fewer could be implemented on a single machine.<p>Even simple operations on smallish data sets are often much faster in NumPy than Pandas.<p>You don&#x27;t have to leave Pandas behind, just try using NumPy and Numba for the hot parts of your code. Numba even lets you write Python code that works with the GIL released, which can lead to linear speedup in the number of cores with much less work than multiprocessing without the overhead of copying data to multiple processes.
评论 #23743574 未加载
alexottalmost 5 years ago
It would be interesting to see koalas compared as well
评论 #23741313 未加载
blackbear_almost 5 years ago
I&#x27;ll just throw it in the discussion: pandas could just interface with and leave the heavy lifting to a RDBMS.
评论 #23745445 未加载
评论 #23751920 未加载
sandGorgonalmost 5 years ago
The tie breaker here really is kubernetes. Most likely your company&#x27;s infrastructure is run on k8s. As a data scientist you do not get control over that.<p>Dask natively integrates with Kubernetes. That&#x27;s why I see a lot of people moving away even from Apache Spark (which is generally used through its inbuilt scheduler YARN) and towards Dask.<p>Second reason is that the dask-ml project is building seamless compatibility for higher order ML algorithms (sklearn,etc) on top of Dask. Not just Numpy&#x2F;Pandas
marcellalmost 5 years ago
I working on a project called CloudPy that&#x27;s a 1-line drop in for pandas to process 100 GB+ dataframes.<p>It works by proxying the dataframe to a remote server, which can have a lot more memory than you&#x27;re local server. The project is in beta right now, but please reach out if you&#x27;re interested in trying it out! You can read more at <a href="http:&#x2F;&#x2F;www.cloudpy.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.cloudpy.io&#x2F;</a> or email hello@cloudpy.io
untorehalmost 5 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;weld-project&#x2F;weld" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;weld-project&#x2F;weld</a> this is in the same domain of vaex I suppose, the scope is much larger though
jdnieralmost 5 years ago
Any sense of where Apache Arrow will fit in these libraries?
评论 #23742882 未加载