Scaling Python with Dask by Holden Karau

Scaling Python with Dask by Holden Karau

Author:Holden Karau
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2023-07-26T00:00:00+00:00


Tip

Dask DataFrame is not value-mutable in the way that pandas DataFrame users might be familiar with. Since in-memory modification of a particular value is not possible, the only way to change a value would be a map operation over the whole column of the entire DataFrame. If an in-memory value change is something you have to do often, it is better to use an external database.

Porting SQL to Dask

Dask does not natively offer a SQL engine, although it does natively offer options to read from a SQL database. There are a number of different libraries you can use to interact with an existing SQL database, and to treat Dask DataFrame as a SQL table and run SQL queries directly (see Example 9-4). Some allow you to even build and serve ML models directly using SQL ML syntax similar to that of Google’s BigQuery ML. In Examples 11-14 and 11-15, we will show the use of Dask’s native read_sql() function and running SQL ML using Dask-SQL.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.