Python Can Be Faster Than C++ -번역

Python은 C ++보다 빠를 수 있습니다.

파이썬을 상상할 수있는 것보다 더 빠르게 만드는 트릭

Image for post

Photo by Jake Givens on Unsplash

Python은 다재다능한 프로그래밍 언어입니다.파이썬은 라이브러리와 높은 수준의 언어로 인해 기계 학습 문제 해결에 가장 많이 사용되지만 다른 많은 언어보다 느린 것으로 알려져 있습니다.그 명성 때문에 많은 사람들이 언어를 버리고 프로그램 해결을 위해 C ++와 같은 다른 옵션을 고수하기로 결정했습니다.

이 기사에서는 파이썬이 C ++보다 얼마나 빠른지 보여줄 것입니다.

기본 속도 테스트

Python과 C ++의 정상적인 속도 차이를 테스트하기 위해소수의 생성연산.두 언어 모두에서 명확한 짧은 단계가있는 간단한 알고리즘입니다.

수입 수학
카운터 당 시간 가져 오기에서
def is_prime (num) :
만약 num == 2 :
반환 True;
num & lt; = 1이거나 num % 2가 아닌 경우 :
False를 반환
range (3, int (math.sqrt (num) +1), 2)의 div의 경우 :
num % div가 아닌 경우 :
False를 반환
True 반환
def 실행 프로그램 (N) :
i 범위 (N) :
is_prime (i)
__name__ ==‘__main__’인 경우 :
N = 10000000
시작 = perf_counter ()
프로그램 실행 (N)
끝 = perf_counter ()
인쇄 (끝-시작)
#include <iostream>
#include <cmath>
#include <time.h>
using namespace std;bool isPrime(int num)
{
if (num == 2) return true;
if (num <= 1 || num % 2 == 0) return false;
double sqrt_num = sqrt(double(num));
for (int div = 3; div <= sqrt_num; div +=2){
if (num % div == 0) return false;
}
return true;
}int main()
{
int N = 10000000;
clock_t start,end;
start = clock();
for (int i; i < N; i++) isPrime(i);
end = clock();
cout << (end — start) / ((double) CLOCKS_PER_SEC);
return 0;
}
  • Python: 80.137 seconds
  • C++ : 3.174 seconds

예상대로 C ++은 기본 테스트에서 Python보다 25 배 더 빠릅니다.따라서 평판은 사실이며 이것은 논리적입니다.

  • Python은 C ++와 달리 동적 언어입니다.
  • GIL (Python Global Interpreter)은 병렬 프로그래밍을 허용하지 않습니다.

이 속도 차이는 파이썬이 유연한 다목적 언어로 만들어 졌기 때문에 수정할 수 있습니다.속도 문제에 대한 최고의 솔루션 중 하나는Numba.

Numba

Numba는 Python 및 NumPy 코드의 하위 집합을 빠른 기계 코드로 변환하는 오픈 소스 JIT 컴파일러입니다.~위키 백과

간단히 말해서 Numba는 Python을 빠르게 만드는 라이브러리입니다.사용하기 매우 쉽고 코드 속도를 크게 변경합니다.Numba 사용을 시작하려면 콘솔 사용을 사용하여 설치하십시오.

pip 설치 numba

Python Implementation After Using Numba

import math
from time import per_counter
from numba import njit, prange
@njit(fastmath=True, cache=True)
def is_prime(num):
if num == 2:
return True;
if num <= 1 or not num % 2:
return False
for div in range(3,int(math.sqrt(num)+1),2):
if not num % div:
return False
return True
@njit(fastmath=True, cache=True,parallel=True)
def run program(N):
for i in prange(N):
is_prime(i)
if __name__ == ‘__main__’:
N = 10000000
start = perf_counter()
run_program(N)
end = perf_counter()
print (end — start)

결과

파이썬: 1.401 초
C ++: 3.174 초

따라서 Python은 C ++보다 빠릅니다.따라서 Python에서 알고리즘의 속도를 C ++보다 빠르게 할 수 있습니다.

Python Can Be Faster Than C++

Python Can Be Faster Than C++

A trick that makes Python faster more than you can imagine

Dec 16, 2020 · 3 min read

Image for post

Photo by Jake Givens on Unsplash

Python is a great versatile programming language. Even though python is used most for machine learning problem solving because of its library and high-level language, it is known to be slower than many other languages. Because of its reputation, many would decide to leave the language behind and stick with other options like C++ for program solving.

In this article, I will show you how Python is faster than C++.

Basic Speed Testing

To test the normal speed difference between Python and C++, I will test the execution time of the Generation of primes algorithm. It is a simple algorithm with clear short steps in both languages.

import math
from time import per_counter
def is_prime(num):
if num == 2:
return True;
if num <= 1 or not num % 2:
return False
for div in range(3,int(math.sqrt(num)+1),2):
if not num % div:
return False
return True
def run program(N):
for i in range(N):
is_prime(i)
if __name__ == ‘__main__’:
N = 10000000
start = perf_counter()
run_program(N)
end = perf_counter()
print (end — start)
#include <iostream>
#include <cmath>
#include <time.h>
using namespace std;bool isPrime(int num)
{
if (num == 2) return true;
if (num <= 1 || num % 2 == 0) return false;
double sqrt_num = sqrt(double(num));
for (int div = 3; div <= sqrt_num; div +=2){
if (num % div == 0) return false;
}
return true;
}int main()
{
int N = 10000000;
clock_t start,end;
start = clock();
for (int i; i < N; i++) isPrime(i);
end = clock();
cout << (end — start) / ((double) CLOCKS_PER_SEC);
return 0;
}
  • Python: 80.137 seconds
  • C++ : 3.174 seconds

As expected, C++ was 25 times faster than Python in our basic test. So the reputation is true, and this is logical as

  • Python is a dynamic language, unlike C++.
  • GIL (Python Global Interpreter) doesn’t allow parallel programming.

This speed difference can be fixed as python was created to be a flexible versatile language. One of the top solutions for the speed problem is using Numba.

Numba

Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. ~ Wikipedia

Briefly, Numba is a library that makes Python fast. It is very easy to use and dramatically change how fast your code. To start using Numba, just install it using the console use

pip install numba

Python Implementation After Using Numba

import math
from time import per_counter
from numba import njit, prange
@njit(fastmath=True, cache=True)
def is_prime(num):
if num == 2:
return True;
if num <= 1 or not num % 2:
return False
for div in range(3,int(math.sqrt(num)+1),2):
if not num % div:
return False
return True
@njit(fastmath=True, cache=True,parallel=True)
def run program(N):
for i in prange(N):
is_prime(i)
if __name__ == ‘__main__’:
N = 10000000
start = perf_counter()
run_program(N)
end = perf_counter()
print (end — start)

Results

Python: 1.401 seconds
C++ : 3.174 seconds

So Python is faster than C++. So it is possible to speed up your algorithms in Python to be faster than C++.

2021년 2월 6일 성남시 분당구 부동산 경매 데이터 분석

2021년 2월 6일 용인시 부동산 경매 데이터 분석

경기도 용인시 기흥구 탑실로 152, 215동 2층202호 (공세동,탑실마을대주피오레2단지) [집합건물 철근콘크리트구조 120.8200㎡]

항목
경매번호 2020타경9656
경매날짜 2021.02.18
법원 수원지방법원
담당 경매7계
감정평가금액 370,000,000
경매가 370,000,000(100%)
유찰여부 신건

  • 1. 재매각임(매수신청보증금 30%)

<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

경기도 용인시 기흥구 동백죽전대로527번길 67, 205동 21층2101호 (중동,어정마을롯데캐슬에코2단지) [집합건물 철근콘크리트조 113.76㎡]

항목
경매번호 2020타경6039
경매날짜 2021.02.16
법원 수원지방법원
담당 경매2계
감정평가금액 544,000,000
경매가 544,000,000(100%)
유찰여부 신건


<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

경기도 용인시 기흥구 언남로 17-1, 상가동 지하1층지하101-1호 (언남동,하마비마을동일하이빌2차아파트) [집합건물 철근콘크리트벽식조 53.605㎡], 경기도 용인시 기흥구 언남로 17-1, 상가동 지하1층지하102호 (언남동,하마비마을동일하이빌2차아파트) [집합건물 철근콘크리트벽식조 76.500㎡], 경기도 용인시 기흥구 언남로 17-1, 상가동 지하1층지하103호 (언남동,하마비마을동일하이빌2차아파트) [집합건물 철근콘크리트벽식조 76.500㎡], 경기도 용인시 기흥구 언남로 17-1, 상가동 지하1층지하104호 (언남동,하마비마을동일하이빌2차아파트) [집합건물 철근콘크리트벽식조 39.780㎡]

항목
경매번호 2020타경2167
경매날짜 2021.02.17
법원 수원지방법원
담당 경매5계
감정평가금액 436,000,000
경매가 213,640,000(49%)
유찰여부 유찰\t2회

  • 1. 일괄매각, 목록1내지4는 벽체 구분 없이 1개호로 세탁업소로 이용중임. 지하층 도면상 복도 일부를 벽체로 막아 본건 경매물건이 아닌 B101-2호를 사용하고 있음 2. 이 사건 부동산의 점유자인 이세인으로부터 2020.3.4.에 유치권신고서 및 2020.5.29.에 유치권권리변경신고서가 접수됨(이 사건 부동산에 대한 매매계약금 반환청구권 및 지연손해금 81,192,657원, 매매계약 해제로 인하여 신고인이 당연히 취할 수 있었던 이행이익에 관한 손해배상채권146,000,000원, 47개월간 점유하면서 발생한 비용상환청구채권 101,996,580원 총329,189,237원)

<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

경기도 용인시 처인구 고림동 184-1 7동 402호 [집합건물 철근콘크리트조 135.074㎡]

항목
경매번호 2019타경515971
경매날짜 2021.02.17
법원 수원지방법원
담당 경매5계
감정평가금액 56,000,000
경매가 56,000,000(100%)
유찰여부 신건

  • 1. 건축법상 사용승인 받지 않은 건물임, 대지권 없음, 미완공상태임

<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

경기도 용인시 처인구 고림동 186-12 8층 801호 [집합건물 철근콘크리트조 141.22㎡]

항목
경매번호 2019타경515971
경매날짜 2021.02.17
법원 수원지방법원
담당 경매5계
감정평가금액 60,000,000
경매가 60,000,000(100%)
유찰여부 신건

  • 1. 건축법상 사용승인 받지 않은 건물임, 대지권 없음, 미완공상태임

<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

경기도 용인시 기흥구 언남로 15, 208동 11층1101호 (언남동,하마비마을동일하이빌2차아파트) [집합건물 철근콘크리트벽식조 161.549㎡]

항목
경매번호 2019타경506021
경매날짜 2021.02.17
법원 수원지방법원
담당 경매5계
감정평가금액 432,000,000
경매가 432,000,000(100%)
유찰여부 신건


<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

2021년 2월 6일 수원시 부동산 경매 데이터 분석

경기도 수원시 권선구 정조로 432, 105동 2층210호 [집합건물 철근콘크리트조 46.68㎡ 2분의 1 김영균지분 전부]

항목
경매번호 2020타경6114
경매날짜 2021.02.17
법원 수원지방법원
담당 경매5계
감정평가금액 110,000,000
경매가 77,000,000(70%)
유찰여부 유찰\t1회

  • 지분매각, 공유자 우선매수신고 제한있음(우선매수신청을 한 공유자는 당해 매각기일 종결 전까지 보증금을 제공하여야 하며, 매수신청권리를 행사하지 않는 경우에는 차회 기일부터는 우선권이 없음)

<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

경기도 수원시 장안구 경수대로976번길 22, 131동 15층1506호 (조원동,수원한일타운) [집합건물 철근콘크리트 벽식구조 84.772㎡]

항목
경매번호 2020타경13754
경매날짜 2021.02.17
법원 수원지방법원
담당 경매5계
감정평가금액 491,000,000
경매가 491,000,000(100%)
유찰여부 신건


<최근 1년 실거래가 정보>
– 총 거래 수: 249건
– 동일 평수 거래 수: 104건

최근 1년 동일 평수 거래건 보기

날짜 전용면적 가격
2021-01-02 84.772 9 50000
2021-01-15 84.772 23 51500
2021-01-25 84.772 17 53000
2021-01-07 84.772 5 49800
2020-12-10 84.772 15 52000
2020-12-07 84.772 8 49000
2020-12-24 84.772 11 52800
2020-12-05 84.772 2 50000
2020-12-11 84.772 22 48800
2020-12-13 84.772 22 50000
2020-12-14 84.772 18 54000
2020-12-17 84.772 12 50000
2020-12-04 84.772 6 49000
2020-12-08 84.772 17 48500
2020-12-22 84.772 11 51900
2020-12-07 84.772 6 49000
2020-11-11 84.772 7 47800
2020-11-13 84.772 16 49800
2020-11-19 84.772 4 47300
2020-11-25 84.772 16 51500
2020-11-29 84.772 6 49750
2020-11-09 84.772 16 53000
2020-11-21 84.772 13 52000
2020-11-09 84.772 15 52000
2020-11-27 84.772 10 51500
2020-11-09 84.772 24 46000
2020-11-09 84.772 16 48500
2020-11-14 84.772 16 49300
2020-10-17 84.772 8 46000
2020-10-20 84.772 1 42900
2020-10-08 84.772 16 48000
2020-10-17 84.772 13 48700
2020-10-29 84.772 15 49800
2020-10-30 84.772 12 49800
2020-10-10 84.772 8 50000
2020-10-26 84.772 10 47000
2020-10-10 84.772 18 46500
2020-09-11 84.772 19 53000
2020-09-05 84.772 3 45750
2020-09-03 84.772 5 43800
2020-09-14 84.772 15 52000
2020-09-02 84.772 6 48800
2020-09-25 84.772 18 49250
2020-09-27 84.772 16 48500
2020-08-11 84.772 17 47300
2020-08-17 84.772 4 45700
2020-08-27 84.772 23 50000
2020-08-12 84.772 11 47000
2020-08-08 84.772 24 44900
2020-08-04 84.772 15 48500
2020-08-07 84.772 13 48500
2020-08-07 84.772 23 47000
2020-07-19 84.772 4 44800
2020-07-22 84.772 20 43700
2020-07-02 84.772 13 47800
2020-07-03 84.772 10 48500
2020-07-15 84.772 8 46000
2020-07-06 84.772 13 48000
2020-07-08 84.772 24 43000
2020-06-01 84.772 9 44000
2020-06-16 84.772 22 42800
2020-06-23 84.772 6 44500
2020-06-25 84.772 9 44900
2020-06-07 84.772 10 46700
2020-06-07 84.772 7 46000
2020-06-16 84.772 9 47000
2020-06-18 84.772 19 49700
2020-06-28 84.772 3 46300
2020-06-28 84.772 1 29000
2020-06-06 84.772 7 46500
2020-06-29 84.772 2 44000
2020-06-06 84.772 18 48500
2020-06-11 84.772 12 43000
2020-06-16 84.772 10 46800
2020-06-03 84.772 13 49750
2020-05-20 84.772 5 41000
2020-05-30 84.772 19 46500
2020-05-31 84.772 10 43200
2020-05-22 84.772 9 46000
2020-05-26 84.772 18 47600
2020-04-12 84.772 13 44500
2020-04-08 84.772 17 41000
2020-04-09 84.772 12 46500
2020-04-06 84.772 5 44300
2020-03-08 84.772 17 45000
2020-03-20 84.772 13 45000
2020-03-31 84.772 9 44700
2020-03-02 84.772 19 43200
2020-03-11 84.772 10 46000
2020-02-17 84.772 6 45000
2020-02-17 84.772 15 42200
2020-02-21 84.772 7 35500
2020-02-07 84.772 12 40000
2020-02-04 84.772 4 43000
2020-02-08 84.772 18 41000
2020-02-08 84.772 14 39800
2020-02-10 84.772 21 41800
2020-02-15 84.772 22 44800
2020-02-09 84.772 4 42400
2020-02-12 84.772 9 43000
2020-02-15 84.772 23 41000
2020-02-18 84.772 2 44900
2020-02-19 84.772 20 43500
2020-02-08 84.772 19 44500

경기도 수원시 권선구 금호로 45, 101동 14층1402호 (금곡동,삼익아파트) [집합건물 철근콘크리트조 59.40㎡]

항목
경매번호 2019타경525893
경매날짜 2021.02.18
법원 수원지방법원
담당 경매7계
감정평가금액 195,000,000
경매가 195,000,000(100%)
유찰여부 신건


<최근 1년 실거래가 정보>
– 총 거래 수: 38건
– 동일 평수 거래 수: 16건

최근 1년 동일 평수 거래건 보기

날짜 전용면적 가격
2021-02-03 59.4 11 23500
2021-01-15 59.4 3 21900
2021-01-08 59.4 7 22750
2020-11-12 59.4 2 20800
2020-11-19 59.4 5 20900
2020-10-22 59.4 2 20800
2020-08-22 59.4 14 22000
2020-07-10 59.4 7 21200
2020-07-25 59.4 13 21500
2020-07-06 59.4 9 22400
2020-04-04 59.4 7 21000
2020-03-24 59.4 17 20500
2020-03-30 59.4 12 22500
2020-02-15 59.4 17 21000
2020-02-18 59.4 2 20000
2020-02-18 59.4 8 22900

경기도 수원시 권선구 동수원로145번길 74, 106동 3층303호 (권선동,수원아이파크시티1단지) [집합건물 철근콘크리트구조 101.97㎡]

항목
경매번호 2019타경507079
경매날짜 2021.02.18
법원 수원지방법원
담당 경매7계
감정평가금액 473,000,000
경매가 473,000,000(100%)
유찰여부 신건


<최근 1년 실거래가 정보>
– 총 거래 수: 39건
– 동일 평수 거래 수: 3건

최근 1년 동일 평수 거래건 보기

날짜 전용면적 가격
2020-12-08 101.97 10 70000
2020-07-28 101.97 3 64500
2020-04-08 101.97 10 65000

경기도 수원시 권선구 상탑로21번길 7-8, 2층201호 (탑동,가림아파트) [집합건물 철근콘크리트조 77.19㎡]

항목
경매번호 2019타경27375
경매날짜 2021.02.18
법원 수원지방법원
담당 경매7계
감정평가금액 203,000,000
경매가 99,470,000(49%)
유찰여부 유찰\t2회

  • 특별매각조건 매수신청보증금 최저매각가격의 20%

<최근 1년 실거래가 정보>
– 총 거래 수: 0건
– 동일 평수 거래 수: 0건

2021년 2월 5일 모바일 게임 매출 순위

Rank Game Publisher
1 리니지M NCSOFT
2 리니지2M NCSOFT
3 그랑사가 NPIXEL
4 세븐나이츠2 Netmarble
5 기적의 검 4399 KOREA
6 Cookie Run: Kingdom Devsisters Corporation
7 Genshin Impact miHoYo Limited
8 R2M Webzen Inc.
9 바람의나라: 연 NEXON Company
10 A3: 스틸얼라이브 Netmarble
11 블레이드&소울 레볼루션 Netmarble
12 V4 NEXON Company
13 라이즈 오브 킹덤즈 LilithGames
14 Pmang Poker : Casino Royal NEOWIZ corp
15 뮤 아크엔젤 Webzen Inc.
16 메이플스토리M NEXON Company
17 FIFA ONLINE 4 M by EA SPORTS™ NEXON Company
18 미르4 Wemade Co., Ltd
19 리니지2 레볼루션 Netmarble
20 S.O.S:스테이트 오브 서바이벌 KingsGroup Holdings
21 Brawl Stars Supercell
22 찐삼국 ICEBIRD GAMES
23 검은강호2: 이터널 소울 9SplayDeveloper
24 한게임 포커 NHN BIGFOOT
25 Roblox Roblox Corporation
26 KartRider Rush+ NEXON Company
27 가디언 테일즈 Kakao Games Corp.
28 카운터사이드 NEXON Company
29 Lords Mobile: Kingdom Wars IGG.COM
30 PUBG MOBILE KRAFTON, Inc.
31 Summoners War Com2uS
32 Age of Z Origins Camel Games Limited
33 AFK 아레나 LilithGames
34 Dungeon Knight: 3D Idle RPG mobirix
35 Cookie Run: OvenBreak – Endless Running Platformer Devsisters Corporation
36 FIFA Mobile NEXON Company
37 한게임포커 클래식 with PC NHN Corp.
38 블리치: 만해의 길 DAMO NETWORK LIMITED
39 Gardenscapes Playrix
40 뮤오리진2 Webzen Inc.
41 라그나로크 오리진 GRAVITY Co., Ltd.
42 프린세스 커넥트! Re:Dive Kakao Games Corp.
43 그랑삼국 YOUZU(SINGAPORE)PTE.LTD.
44 검은사막 모바일 PEARL ABYSS
45 Homescapes Playrix
46 리니지M(12) NCSOFT
47 Empires & Puzzles: Epic Match 3 Small Giant Games
48 슬램덩크 DeNA HONG KONG LIMITED
49 Top War: Battle Game Topwar Studio
50 갑부: 장사의 시대 BLANCOZONE NETWORK KOREA

Are You Still Using Pandas to Process Big Data in 2021? -번역

2021 년에도 여전히 Pandas를 사용하여 빅 데이터를 처리하고 있습니까?

Pandas는 빅 데이터를 잘 처리하지 못합니다.이 두 라이브러리는 그렇습니다!어느 것이 더 낫습니까?더 빨리?

Photo by NASA on Unsplash

나는최근에 빅 데이터를 처리하는 방법에 대한 두 개의 소개 기사를 작성했습니다.DaskVaex— 메모리 데이터 세트보다 큰 처리를위한 라이브러리.글을 쓰는 동안 내 마음에 질문이 떠올랐다.

이러한 라이브러리가 실제로 메모리 데이터 세트보다 더 큰 데이터를 처리 할 수 있습니까? 아니면 모두 판매 슬로건입니까?

이것은 나를 흥미롭게했다 Dask와 Vaex로 실용적인 실험을하고 메모리보다 큰 데이터 셋을 처리하려고합니다.데이터 세트가 너무 커서 팬더로 열 수도 없습니다.

빅 데이터 란 무엇을 의미합니까?

~의 사진ev의 위에Unsplash

빅 데이터는 느슨하게 정의 된 용어입니다. Google의 조회수만큼 많은 정의가 있습니다.이 기사에서는이 용어를 사용하여 데이터를 처리하기 위해 특수 소프트웨어가 필요한 너무 큰 데이터 세트를 설명합니다.Big에서는 “단일 시스템의 주 메모리보다 더 크다”는 의미입니다.

Wikipedia의 정의 :

빅 데이터는 기존의 데이터 처리 응용 프로그램 소프트웨어로 처리하기에는 너무 크거나 복잡한 데이터 세트를 분석하거나, 체계적으로 정보를 추출하거나, 처리하는 방법을 다루는 분야입니다.

Dask와 Vaex는 무엇입니까?

~의 사진JESHOOTS.COM의 위에Unsplash

Dask분석을위한 고급 병렬 처리를 제공하여 좋아하는 도구에 대한 대규모 성능을 지원합니다.여기에는 numpy, pandas 및 sklearn이 포함됩니다.오픈 소스이며 자유롭게 사용할 수 있습니다.기존 Python API 및 데이터 구조를 사용하여 Dask로 구동되는 등가물간에 쉽게 전환 할 수 있습니다.

VaexLazy Out-of-Core DataFrames (Pandas와 유사)를위한 고성능 Python 라이브러리로, 큰 테이블 형식 데이터 세트를 시각화하고 탐색합니다.초당 10 억 개 이상의 행에 대한 기본 통계를 계산할 수 있습니다.빅 데이터의 대화 형 탐색을 허용하는 여러 시각화를 지원합니다.

Dask 및 Vaex 데이터 프레임은 Pandas 데이터 프레임과 완전히 호환되지 않지만 가장 일반적인 “데이터 랭 글링”작업은 두 도구에서 모두 지원됩니다.Dask는 클러스터를 계산하기 위해 코드를 확장하는 데 더 중점을 두는 반면 Vaex는 단일 컴퓨터에서 대규모 데이터 세트로 작업하기가 더 쉽습니다.

Dask 및 Vaex에 대한 내 기사를 놓친 경우 :

실험

~의 사진루이스 리드의 위에Unsplash

1 백만 개의 행과 1000 개의 열이있는 두 개의 CSV 파일을 생성했습니다.파일 크기는 18.18GB로 합쳐서 36.36GB입니다.파일에는 0과 100 사이의 균일 분포에서 난수가 있습니다.

임의 데이터가있는 두 개의 CSV 파일.저자가 만든 사진
팬더를 pd로 가져 오기
numpy를 np로 가져 오기
OS 가져 오기 경로에서n_rows = 1_000_000
n_cols = 1000
범위 (1, 3)에있는 i의 경우 :
파일 이름 = 'analysis_ % d.csv'% i
file_path = path.join ( 'csv_files', 파일 이름)
df = pd.DataFrame (np.random.uniform (0, 100, size = (n_rows, n_cols)), columns = [ 'col % d'% i for i in range (n_cols)])
print ( '저장', 파일 _ 경로)
df.to_csv (file_path, index = False)
df.head ()
Head of a file. Photo made by the author

이 실험은 32GB의 메인 메모리를 갖춘 MacBook Pro에서 실행되었습니다.pandas Dataframe의 한계를 테스트 할 때 놀랍게도 그러한 컴퓨터에서 메모리 오류에 도달하는 것이 상당히 어렵다는 것을 알았습니다!

macOS는 메모리가 용량에 가까워지면 메인 메모리에서 SSD로 데이터를 덤프하기 시작합니다.Pandas Dataframe의 상한은 머신의 100GB 여유 디스크 공간이었습니다.

WMac에 메모리가 필요한 경우 현재 사용되지 않는 항목을 임시 저장을 위해 스왑 파일로 푸시합니다.다시 액세스해야 할 때 스왑 파일에서 데이터를 읽어 메모리에 다시 넣습니다.

실험이 공정 해지려면이 문제를 어떻게 해결해야할지 고민했습니다.내 마음에 떠오른 첫 번째 아이디어는 각 라이브러리가 주 메모리 만 사용할 수 있도록 스와핑을 비활성화하는 것이 었습니다. macOS에서 행운을 빕니다.몇 시간을 보낸 후 스와핑을 비활성화 할 수 없었습니다.

두 번째 아이디어는 무차별 대입 방식을 사용하는 것이 었습니다.기기에 여유 공간이 없어 운영 체제에서 스왑을 사용할 수 없도록 SSD를 전체 용량으로 채웠습니다.

실험 중 디스크가 거의 꽉 찼습니다.저자가 만든 사진

이것은 효과가 있었다!Pandas는 두 개의 18GB 파일을 읽을 수 없었고 Jupyter Kernel이 다운되었습니다.

이 실험을 다시 수행하면 메모리가 더 적은 가상 머신을 만들 것입니다.이렇게하면 이러한 도구의 한계를 더 쉽게 보여줄 수 있습니다.

Dask 또는 Vaex가 이러한 대용량 파일을 처리하는 데 도움을 줄 수 있습니까?어느 것이 더 빠릅니까?알아 보자.

Vaex 대 Dask

~의 사진프리다 브레 데센의 위에Unsplash

실험을 설계 할 때 데이터 분석을 수행 할 때 데이터 그룹화, 필터링 및 시각화와 같은 기본 작업을 생각했습니다.다음 작업을 생각해 냈습니다.

  • 열의 10 번째 분위수 계산,
  • 새 열 추가,
  • 열로 필터링,
  • 열별로 그룹화 및 집계,
  • 열 시각화.

위의 모든 작업은 단일 열을 사용하여 계산을 수행합니다. 예 :

# 단일 열로 필터링
df [df.col2 & gt;10]

그래서 모든 데이터를 처리해야하는 작업을 시도하고 싶었습니다.

  • 모든 열의 합계를 계산합니다.

이것은 계산을 더 작은 청크로 분할하여 달성 할 수 있습니다.예 :각 열을 개별적으로 읽고 합계를 계산하고 마지막 단계에서 전체 합계를 계산합니다.이러한 유형의 계산 문제는 다음과 같이 알려져 있습니다.난처하게 평행— 문제를 별도의 작업으로 분리하기 위해 노력할 필요가 없습니다.

Vaex

~의 사진Lanty의 사진의 위에Unsplash

Vaex부터 시작하겠습니다.실험은 각 도구에 대한 모범 사례를 따르는 방식으로 설계되었습니다. 이것은 Vaex 용 바이너리 형식 HDF5를 사용하는 것입니다.따라서 CSV 파일을 HDF5 형식 (The Hierarchical Data Format 버전 5)으로 변환해야합니다.

glob 가져 오기
수입 vaex
csv_files = glob.glob ( 'csv_files / *. csv')i의 경우 enumerate (csv_files, 1)의 csv_file :
j의 경우 enumerate (vaex.from_csv (csv_file, chunk_size = 5_000_000), 1)의 dv :
print ( '% d % s을 (를) hdf5 부분 % d'로 내보내는 중 '% (i, csv_file, j))
dv.export_hdf5 (f'hdf5_files / analysis_ {i : 02} _ {j : 02} .hdf5 ')

Vaex는 2 개의 CSV 파일 (36.36GB)을 16GB가 결합 된 2 개의 HDF5 파일로 변환하는 데 405 초가 필요했습니다.텍스트에서 이진 형식으로 변환하면 파일 크기가 줄어 들었습니다.

Vaex로 HDF5 데이터 세트 열기 :

dv = vaex.open('hdf5_files/*.hdf5')

Vaex는 HDF5 파일을 읽는 데 1218 초가 필요했습니다.Vaex가 바이너리 형식의 파일을 거의 즉시 열 수 있다고 주장하므로 더 빠를 것으로 예상했습니다.

Vaex 문서에서:

이러한 데이터를 여는 것은 디스크의 파일 크기에 관계없이 즉시 이루어집니다. Vaex는 데이터를 메모리에서 읽는 대신 메모리 매핑 만합니다.이것은 사용 가능한 RAM보다 큰 대용량 데이터 세트로 작업하는 최적의 방법입니다.

Vaex가있는 디스플레이 헤드 :

dv.head()

Vaex는 머리를 표시하는 데 1189 초가 필요했습니다.각 열의 처음 5 개 행을 표시하는 데 왜 그렇게 오래 걸 렸는지 잘 모르겠습니다.

Vaex를 사용하여 10 번째 분위수 계산 :

Vaex에는 분위수의 근사치를 계산하는 percentile_approx 함수가 있습니다.

분위수 = dv.percentile_approx ( 'col1', 10)

Vaex는 col1 열에 대한 10 번째 분위수의 근사치를 계산하는 데 0 초가 필요했습니다.

Vaex로 새 열을 추가하십시오.

dv[‘col1_binary’] = dv.col1 > dv.percentile_approx(‘col1’, 10)

Vaex에는 식을 열로 저장하는 가상 열 개념이 있습니다.메모리를 차지하지 않으며 필요할 때 즉시 계산됩니다.가상 열은 일반 열처럼 처리됩니다.예상대로 Vaex는 위의 명령을 실행하는 데 0 초가 필요했습니다.

Vaex로 데이터 필터링 :

Vaex는선택, Dask는 선택을 지원하지 않아 실험이 불공평 해 지므로 사용하지 않았습니다.아래 필터는 Vaex가 데이터를 복사하지 않는다는 점을 제외하면 Pandas로 필터링하는 것과 유사합니다.

dv = dv [dv.col2 & gt;10]

Vaex는 위의 필터를 실행하는 데 0 초가 필요했습니다.

Vaex로 데이터 그룹화 및 집계 :

아래 명령은 그룹화 및 집계를 결합하므로 pandas와 약간 다릅니다.이 명령은 col1_binary로 데이터를 그룹화하고 col3의 평균을 계산합니다.

group_res = dv.groupby (by = dv.col1_binary, agg = { 'col3_mean': vaex.agg.mean ( 'col3')})
Calculating mean with Vaex. Photo made by the author

Vaex는 위의 명령을 실행하는 데 0 초가 필요했습니다.

히스토그램 시각화 :

더 큰 데이터 세트를 사용한 시각화는 기존의 데이터 분석 도구가이를 처리하도록 최적화되지 않았기 때문에 문제가됩니다.Vaex로 col3의 히스토그램을 만들 수 있는지 살펴 보겠습니다.

플롯 = dv.plot1d (dv.col3, what = 'count (*)', 제한 = [0, 100])
Visualizing data with Vaex. Photo made by the author

Vaex는 플롯을 표시하는 데 0 초가 필요했는데 놀랍도록 빨랐습니다.

모든 열의 합계 계산

한 번에 하나의 열을 처리 할 때 메모리는 문제가되지 않습니다.Vaex를 사용하여 데이터 세트에있는 모든 숫자의 합계를 계산해 보겠습니다.

suma = np.sum (dv.sum (dv.column_names))

Vaex는 모든 열의 합계를 계산하는 데 40 초가 필요했습니다.

Dask

~의 사진켈리 식 케마의 위에Unsplash

이제 위의 작업을 반복하지만 Dask를 사용합니다.Dask 명령을 실행하기 전에 Jupyter 커널이 다시 시작되었습니다.

Dask의 read_csv 함수를 사용하여 CSV 파일을 직접 읽는 대신 CSV 파일을 HDF5로 변환하여 공정한 실험을 만듭니다.

dask.dataframe을 dd로 가져 오기ds = dd.read_csv ( 'csv_files / *. csv')
ds.to_hdf ( 'hdf5_files_dask / analysis_01_01.hdf5', key = 'table')

Dask는 변환에 763 초가 필요했습니다.Dask로 데이터를 변환하는 더 빠른 방법이 있으면 댓글로 알려주세요.운없이 Vaex로 변환 된 HDF5 파일을 읽으려고했습니다.

Dask의 모범 사례:

HDF5는 고성능이 필요한 Pandas 사용자에게 인기있는 선택입니다.Dask DataFrame 사용자는 대신 Parquet을 사용하여 데이터를 저장하고로드하는 것이 좋습니다.

Dask로 HDF5 데이터 세트 열기 :

import dask.dataframe as ddds = dd.read_csv('csv_files/*.csv')

Dask는 HDF5 파일을 여는 데 0 초가 필요했습니다.실제로 파일을 읽는 compute 명령을 명시 적으로 실행하지 않았기 때문입니다.

Dask가있는 디스플레이 헤드 :

ds.head()

Dask는 파일의 처음 5 개 행을 출력하는 데 9 초가 필요했습니다.

Dask를 사용하여 10 번째 분위수를 계산합니다.

Dask에는 근사치가 아닌 실제 분위수를 계산하는 분위수 함수가 있습니다.

Quantile = ds.col1.quantile (0.1) .compute ()

Dask는 Juptyter Kernel이 중단되어 분위수를 계산할 수 없었습니다.

Dask로 새 열을 정의합니다.

아래 함수는 분위수 함수를 사용하여 새 이진 열을 정의합니다.Dask는 분위수를 사용하기 때문에 계산할 수 없었습니다.

ds [ 'col1_binary'] = ds.col1 & gt;ds.col1.quantile (0.1)

Dask로 데이터 필터링 :

ds = ds[(ds.col2 > 10)]

위의 명령은 Dask가 지연된 실행 패러다임을 사용하므로 실행하는 데 0 초가 필요했습니다.

Dask로 데이터 그룹화 및 집계 :

group_res = ds.groupby('col1_binary').col3.mean().compute()

Dask는 데이터를 그룹화하고 집계 할 수 없었습니다.

col3의 히스토그램을 시각화합니다.

plot = ds.col3.compute().plot.hist(bins=64, ylim=(13900, 14400))

Dask는 데이터를 시각화 할 수 없었습니다.

모든 열의 합계를 계산합니다.

suma = ds.sum().sum().compute()

Dask는 모든 데이터를 합산 할 수 없었습니다.

결과

아래 표는 Vaex vs Dask 실험의 실행 시간을 보여줍니다.NA는 도구가 데이터를 처리 할 수없고 Jupyter Kernel이 다운되었음을 의미합니다.

실험의 실행 시간 요약.저자가 만든 사진

결론

~의 사진조슈아 골데의 위에Unsplash

Vaex는 CSV를 HDF5 형식으로 변환해야하는데, 점심에 가서 돌아 오면 데이터가 변환 될 수 있기 때문에 신경 쓰지 않습니다.또한 주 메모리가 거의 또는 전혀없는 열악한 조건 (실험과 같이)에서는 데이터를 읽는 데 더 오래 걸릴 것임을 이해합니다.

내가 이해하지 못하는 것은 Vaex가 파일의 헤드를 표시하는 데 필요한 시간입니다 (처음 5 개 행에 대해 1189 초!).Vaex의 다른 작업은 크게 최적화되어 주 메모리 데이터 세트보다 더 큰 데이터를 대화식으로 분석 할 수 있습니다.

Dask는 단일 머신 대신 컴퓨팅 클러스터에 더 최적화되어 있기 때문에 다소 문제가있을 것으로 예상했습니다.Dask는 pandas 위에 구축되어 있습니다. 즉, pandas에서 느린 작업은 Dask에서 느리게 유지됩니다.

실험의 승자는 분명합니다.Vaex는 노트북의 메인 메모리 파일보다 더 큰 파일을 처리 할 수 있었지만 Dask는 처리 할 수 없었습니다.이 실험은 컴퓨팅 클러스터가 아닌 단일 머신에서 성능을 테스트하기 때문에 구체적입니다.

가기 전에

-교육 분야의 AI [동영상]-데이터 과학자를위한 무료 기술 테스트 & amp;기계 학습 엔지니어-비즈니스 리더를위한 데이터 과학[강좌]-PyTorch를 사용한 기계 학습 소개[강좌]-성장 제품 관리자되기[강좌]-대화 형 AI 및 분석을위한 라벨링 및 데이터 엔지니어링

위의 링크 중 일부는 제휴 링크이며 구매를 위해 통과하면 수수료를 받게됩니다.내가 코스를 링크하는 이유는 구매에 대한 수수료 때문이 아니라 품질 때문이라는 점을 명심하십시오.

나를 따라와트위터, 내가 정기적으로트위터데이터 과학 및 기계 학습에 대해.

~의 사진코트니 헤저의 위에Unsplash

Are You Still Using Pandas to Process Big Data in 2021?

Are You Still Using Pandas to Process Big Data in 2021?

Pandas doesn’t handle well Big Data. These two libraries do! Which one is better? Faster?

Photo by NASA on Unsplash

I recently wrote two introductory articles about processing Big Data with Dask and Vaex — libraries for processing bigger than memory datasets. While writing, a question popped up in my mind:

Can these libraries really process bigger than memory datasets or is it all just a sales slogan?

This intrigued me to make a practical experiment with Dask and Vaex and try to process a bigger than memory dataset. The dataset was so big that you cannot even open it with pandas.

What do I mean by Big Data?

Photo by ev on Unsplash

Big Data is a loosely defined term, which has as many definitions as there are hits on Google. In this article, I use the term to describe a dataset that is so big that we need specialized software to process it. With Big, I am referring to “bigger than the main memory on a single machine”.

Definition from Wikipedia:

Big data is a field that treats ways to analyze, systematically extract information from, or otherwise, deal with data sets that are too large or complex to be dealt with by traditional data-processing application software.

What are Dask and Vaex?

Photo by JESHOOTS.COM on Unsplash

Dask provides advanced parallelism for analytics, enabling performance at scale for the tools you love. This includes numpy, pandas and sklearn. It is open-source and freely available. It uses existing Python APIs and data structures to make it easy to switch between Dask-powered equivalents.

Vaex is a high-performance Python library for lazy Out-of-Core DataFrames (similar to Pandas), to visualize and explore big tabular datasets. It can calculate basic statistics for more than a billion rows per second. It supports multiple visualizations allowing interactive exploration of big data.

Dask and Vaex Dataframes are not fully compatible with Pandas Dataframes but some most common “data wrangling” operations are supported by both tools. Dask is more focused on scaling the code to compute clusters, while Vaex makes it easier to work with large datasets on a single machine.

In case you’ve missed my articles about the Dask and Vaex:

The Experiment

Photo by Louis Reed on Unsplash

I’ve generated two CSV files with 1 million rows and 1000 columns. The size of a file was 18.18 GB, which is 36.36 GB combined. Files have random numbers from a Uniform distribution between 0 and 100.

Two CSV files with random data. Photo made by the author
import pandas as pd
import numpy as np
from os import pathn_rows = 1_000_000
n_cols = 1000
for i in range(1, 3):
filename = 'analysis_%d.csv' % i
file_path = path.join('csv_files', filename)
df = pd.DataFrame(np.random.uniform(0, 100, size=(n_rows, n_cols)), columns=['col%d' % i for i in range(n_cols)])
print('Saving', file_path)
df.to_csv(file_path, index=False)
df.head()
Head of a file. Photo made by the author

The experiment was run on a MacBook Pro with 32 GB of main memory — quite a beast. When testing the limits of a pandas Dataframe, I surprisingly found out that reaching a Memory Error on such a machine is quite a challenge!

macOS starts dumping data from the main memory to SSD when the memory is running near its capacity. The upper limit for pandas Dataframe was 100 GB of free disk space on the machine.

When your Mac needs memory it will push something that isn’t currently being used into a swapfile for temporary storage. When it needs access again, it will read the data from the swap file and back into memory.

I’ve spent some time thinking about how should I address this issue so that the experiment would be fair. The first idea that came to my mind was to disable swapping so that each library would have only the main memory available — good luck with that on macOS. After spending a few hours I wasn’t able to disable swapping.

The second idea was to use a brute force approach. I’ve filled the SSD to its full capacity so that the operating system couldn’t use swap as there was no free space left on the device.

Your disk is almost full notification during the experiment. Photo made by the author

This worked! pandas couldn’t read two 18 GB files and Jupyter Kernel crashed.

If I would perform this experiment again I would create a virtual machine with less memory. That way it would be easier to show the limits of these tools.

Can Dask or Vaex help us and process these large files? Which one is faster? Let’s find out.

Vaex vs Dask

Photo by Frida Bredesen on Unsplash

When designing the experiment, I thought about basic operations when performing Data Analysis, like grouping, filtering and visualizing data. I came up with the following operations:

  • calculating 10th quantile of a column,
  • adding a new column,
  • filtering by column,
  • grouping by column and aggregating,
  • visualizing a column.

All of the above operations perform a calculation using a single column, eg:

# filtering with a single column
df[df.col2 > 10]

So I was intrigued to try an operation, which requires all data to be processed:

  • calculate the sum of all of the columns.

This can be achieved by breaking down the calculation to smaller chunks. Eg. reading each column separately and calculating the sum and in the last step calculating the overall sum. These types of computational problems are known as Embarrassingly parallel — no effort is required to separate the problem into separate tasks.

Vaex

Photo by Photos by Lanty on Unsplash

Let’s start with Vaex. The experiment was designed in a way that follows best practices for each tool — this is using binary format HDF5 for Vaex. So we need to convert CSV files to HDF5 format (The Hierarchical Data Format version 5).

import glob
import vaex
csv_files = glob.glob('csv_files/*.csv')for i, csv_file in enumerate(csv_files, 1):
for j, dv in enumerate(vaex.from_csv(csv_file, chunk_size=5_000_000), 1):
print('Exporting %d %s to hdf5 part %d' % (i, csv_file, j))
dv.export_hdf5(f'hdf5_files/analysis_{i:02}_{j:02}.hdf5')

Vaex needed 405 seconds to covert two CSV files (36.36 GB) to two HDF5 files, which have 16 GB combined. Conversion from text to binary format reduced the file size.

Open HDF5 dataset with Vaex:

dv = vaex.open('hdf5_files/*.hdf5')

Vaex needed 1218 seconds to read the HDF5 files. I expected it to be faster as Vaex claims near-instant opening of files in binary format.

From Vaex documentation:

Opening such data is instantenous regardless of the file size on disk: Vaex will just memory-map the data instead of reading it in memory. This is the optimal way of working with large datasets that are larger than available RAM.

Display head with Vaex:

dv.head()

Vaex needed 1189 seconds to display head. I am not sure why displaying the first 5 rows of each column took so long.

Calculate 10th quantile with Vaex:

Note, Vaex has percentile_approx function which calculates an approximation of quantile.

quantile = dv.percentile_approx('col1', 10)

Vaex needed 0 seconds to calculate the approximation of the 10th quantile for the col1 column.

Add a new column with Vaex:

dv[‘col1_binary’] = dv.col1 > dv.percentile_approx(‘col1’, 10)

Vaex has a concept of virtual columns, which stores an expression as a column. It does not take up any memory and is computed on the fly when needed. A virtual column is treated just like a normal column. As expected Vaex needed 0 seconds to execute the command above.

Filter data with Vaex:

Vaex has a concept of selections, which I didn’t use as Dask doesn’t support selections, which would make the experiment unfair. The filter below is similar to filtering with pandas, except that Vaex does not copy the data.

dv = dv[dv.col2 > 10]

Vaex needed 0 seconds to execute the filter above.

Grouping and aggregating data with Vaex:

The command below is slightly different from pandas as it combines grouping and aggregation. The command groups the data by col1_binary and calculate the mean for col3:

group_res = dv.groupby(by=dv.col1_binary, agg={'col3_mean': vaex.agg.mean('col3')})
Calculating mean with Vaex. Photo made by the author

Vaex needed 0 seconds to execute the command above.

Visualize the histogram:

Visualization with bigger datasets is problematic as traditional tools for data analysis are not optimized to handle them. Let’s try if we can make a histogram of col3 with Vaex.

plot = dv.plot1d(dv.col3, what='count(*)', limits=[0, 100])
Visualizing data with Vaex. Photo made by the author

Vaex needed 0 seconds to display the plot, which was surprisingly fast.

Calculate the sum of all columns

Memory is not an issue when processing a single column at a time. Let’s try to calculate the sum of all the numbers in the dataset with Vaex.

suma = np.sum(dv.sum(dv.column_names))

Vaex needed 40 seconds to calculate the sum of all columns.

Dask

Photo by Kelly Sikkema on Unsplash

Now, let’s repeat the operations above but with Dask. The Jupyter Kernel was restarted before running Dask commands.

Instead of reading CSV files directly with Dask’s read_csv function, we convert the CSV files to HDF5 to make the experiment fair.

import dask.dataframe as ddds = dd.read_csv('csv_files/*.csv')
ds.to_hdf('hdf5_files_dask/analysis_01_01.hdf5', key='table')

Dask needed 763 seconds for conversion. Let me know in the comments if there is a faster way to convert the data with Dask. I tried to read the HDF5 files that were converted with Vaex with no luck.

Best practices with Dask:

HDF5 is a popular choice for Pandas users with high performance needs. We encourage Dask DataFrame users to store and load data using Parquet instead.

Open HDF5 dataset with Dask:

import dask.dataframe as ddds = dd.read_csv('csv_files/*.csv')

Dask needed 0 seconds to open the HDF5 file. This is because I didn’t explicitly run the compute command, which would actually read the file.

Display head with Dask:

ds.head()

Dask needed 9 seconds to output the first 5 rows of the file.

Calculate the 10th quantile with Dask:

Dask has a quantile function, which calculates actual quantile, not an approximation.

quantile = ds.col1.quantile(0.1).compute()

Dask wasn’t able to calculate quantile as Juptyter Kernel crashed.

Define a new column with Dask:

The function below uses the quantile function to define a new binary column. Dask wasn’t able to calculate it because it uses quantile.

ds['col1_binary'] = ds.col1 > ds.col1.quantile(0.1)

Filter data with Dask:

ds = ds[(ds.col2 > 10)]

The command above needed 0 seconds to execute as Dask uses the delayed execution paradigm.

Grouping and aggregating data with Dask:

group_res = ds.groupby('col1_binary').col3.mean().compute()

Dask wasn’t able to group and aggregate the data.

Visualize the histogram of col3:

plot = ds.col3.compute().plot.hist(bins=64, ylim=(13900, 14400))

Dask wasn’t able to visualize the data.

Calculate the sum of all columns:

suma = ds.sum().sum().compute()

Dask wasn’t able to sum all the data.

Results

The table below shows the execution times of the Vaex vs Dask experiment. NA means that the tool couldn’t process the data and Jupyter Kernel crashed.

Summary of execution times in the experiment. Photo made by the author

Conclusion

Photo by Joshua Golde on Unsplash

Vaex requires conversion of CSV to HDF5 format, which doesn’t bother me as you can go to lunch, come back and the data will be converted. I also understand that in harsh conditions (like in the experiment) with little or no main memory reading data will take longer.

What I don’t understand is the time that Vaex needed to display the head of the file (1189 seconds for the first 5 rows!). Other operations in Vaex are heavily optimized, which enables us to do interactive data analysis on bigger than main memory datasets.

I kinda expected the problems with Dask as it is more optimized for compute clusters instead of a single machine. Dask is built on top of pandas, which means that operations that are slow in pandas, stay slow in Dask.

The winner of the experiment is clear. Vaex was able to process bigger than the main memory file on a laptop while Dask couldn’t. This experiment is specific as I am testing performance on a single machine, not a compute cluster.

Before you go

- AI in Education [Video]- Free skill tests for Data Scientists & Machine Learning Engineers- Data Science for Business Leaders [Course]- Intro to Machine Learning with PyTorch [Course]- Become a Growth Product Manager [Course]- Labeling and Data Engineering for Conversational AI and Analytics

Some of the links above are affiliate links and if you go through them to make a purchase I’ll earn a commission. Keep in mind that I link courses because of their quality and not because of the commission I receive from your purchases.

Follow me on Twitter, where I regularly tweet about Data Science and Machine Learning.

Photo by Courtney Hedger on Unsplash

2021년 2월 5일 성남시 분당구 부동산 경매 데이터 분석

2021년 2월 5일 용인시 부동산 경매 데이터 분석