This document summarizes the current state of large data processing in Python. It discusses Apache Spark and its RDD and SQL features. It also covers vectorized UDFs in PySpark and Spark structured streaming. Dask and its array, dataframe, and bag features are presented as an alternative to Spark. Ray is introduced as another framework building on Pandas. Google BigQuery and TensorFlow are also mentioned as options for cloud platforms. The document concludes by discussing functional programming and SQL as possible directions for the future.
9. UDF?!
Rozwiązanie - Java/Scala UDF to Python: http://sigdelta.com/blog/scala-spark-udfs-in-python/
from pyspark.sql.types import IntegerType
@udf(returnType=IntegerType())
def add_one(x):
if x is not None:
return x + 1
14. Dask Array
Źródło: https://dask.pydata.org/
import dask.array as da
import numpy as np
x = da.ones(10, chunks=(5,))
y = np.ones(10)
z = x + y
print(z)
# dask.array<add, shape=(10,),
# … dtype=float64, chunksize=(5,)>
32. Twoja opinia na temat mojej prelekcji jest dla mnie bardzo ważna.
1. Wejdź w mój wykład znajdujący się w agendzie w aplikacji
Eventory.
2. Oceń moją prelekcję i dodaj swój komentarz.
Dzięki temu będę wiedział/a, co Ci się podobało a co
powinienem/am ulepszyć!