Dask APIs generally follow from upstream APIs:
- Dash Api App
- Dash Api Documentation Browser 5 1 2018
- Dash Api Documentation Browser
- Dash Api Documentation Browser 5 1 2010
- Spring's variant of the Commons Logging API: with special support for Log4J 2, SLF4J and java.util.logging. Org.springframework.aop Core Spring AOP interfaces, built on AOP Alliance AOP interoperability interfaces.
- Prior to jQuery 1.4.3,.data( obj ) completely replaced all data. Since jQuery 1.4.3, data is instead extended by shallow merge. Since jQuery 3, every two-character sequence of '-' (U+002D) followed by a lowercase ASCII letter in a key is replaced by the uppercase version of the letter, in alignment with the HTML dataset API.
If you’re new to Dash, just head down to the tutorial section below and get started. This section is for users Dash v0.x upgrading to v1.0. We’ve learned a lot from working with the amazing Dash community, and Dash v1.0 makes a number of changes to make your apps even more intuitive, powerful, and extensible as Dash continues to evolve.
- Arrays follows NumPy
- DataFrames follows Pandas
- Bag follows map/filter/groupby/reduce common in Spark and Python iterators
- Dask-ML follows the Scikit-Learn and others
- Delayed wraps general Python code
- Futures follows concurrent.futures from the standard library for real-time computation.
Additionally, Dask has its own functions to start computations, persist data inmemory, check progress, and so forth that complement the APIs above.These more general Dask functions are described below:
compute (*args, **kwargs) | Compute several dask collections at once. |
is_dask_collection (x) | Returns True if x is a dask collection |
optimize (*args, **kwargs) | Optimize several dask collections at once. |
persist (*args, **kwargs) | Persist multiple Dask collections into memory |
visualize (*args, **kwargs) | Visualize several dask graphs at once. |
These functions work with any scheduler. More advanced operations areavailable when using the newer scheduler and starting a
dask.distributed.Client
(which, despite its name, runs nicely on asingle machine). This API provides the ability to submit, cancel, and trackwork asynchronously, and includes many functions for complex inter-taskworkflows. These are not necessary for normal operation, but can be useful forreal-time or advanced operation.This more advanced API is available in the Dask distributed documentation
dask.
compute
(*args, **kwargs)¶Compute several dask collections at once.
Parameters: |
|
---|
Examples
Dash Api App
By default, dask objects inside python collections will also be computed:
dask.
is_dask_collection
(x)¶Returns
True
if x
is a dask collectiondask.
optimize
(*args, **kwargs)¶Optimize several dask collections at once.
Returns equivalent dask collections that all share the same merged andoptimized underlying graph. This can be useful if converting multiplecollections to delayed objects, or to manually apply the optimizations atstrategic points.
Note that in most cases you shouldn’t need to call this method directly.
Parameters: |
|
---|
Examples
dask.
persist
(*args, **kwargs)¶Persist multiple Dask collections into memory
Dash Api Documentation Browser 5 1 2018
This turns lazy Dask collections into Dask collections with the samemetadata, but now with their results fully computed or actively computingin the background.
For example a lazy dask.array built up from many lazy calls will now be adask.array of the same shape, dtype, chunks, etc., but now with all ofthose previously lazy tasks either computed in memory as many small
numpy.array
(in the single-machine case) or asynchronously running in thebackground on a cluster (in the distributed case).This function operates differently if a
dask.distributed.Client
existsand is connected to a distributed scheduler. In this case this functionwill return as soon as the task graph has been submitted to the cluster,but before the computations have completed. Computations will continueasynchronously in the background. When using this function with the singlemachine scheduler it blocks until the computations have finished.Dash Api Documentation Browser
When using Dask on a single machine you should ensure that the dataset fitsentirely within memory.
Parameters: |
|
---|---|
Returns: |
|
Examples
dask.
visualize
(*args, **kwargs)¶Visualize several dask graphs at once.
Requires
graphviz
to be installed. All options that are not the daskgraph(s) should be passed as keyword arguments.Parameters: |
|
---|---|
Returns: |
|
See also
dask.dot.dot_graph
Notes
For more information on optimization see here:
Examples
Datasets¶
Dask has a few helpers for generating demo datasets
dask.datasets.
make_people
(npartitions=10, records_per_partition=1000, seed=None, locale='en')¶Iffmpeg 6 1 4 download free. Make a dataset of random people
This makes a Dask Bag with dictionary records of randomly generated people.This requires the optional library
mimesis
to generate records.Parameters: |
|
---|---|
Returns: |
|
dask.datasets.
timeseries
(start='2000-01-01', end='2000-01-31', freq='1s', partition_freq='1d', dtypes={'id': <class 'int'>, 'name': <class 'str'>, 'x': <class 'float'>, 'y': <class 'float'>}, seed=None, **kwargs)¶Create timeseries dataframe with random data
Parameters: |
|
---|
Examples
Dash Api Documentation Browser 5 1 2010
Utilities¶
Dask has some public utility methods. These are primarily used for parsingconfiguration values.
dask.utils.
format_bytes
(n)¶Format bytes as text
dask.utils.
format_time
(n)¶format integers as time
dask.utils.
parse_bytes
(s)¶Parse byte string to numbers
dask.utils.
parse_timedelta
(s, default='seconds')¶Parse timedelta string to number of seconds
Examples
TL;DR:Download Dash 5 for macOS and try it out!
Dash 5 is the latest version of Dash and includes a lot of improvements and a completely new, streamlined search interface.
Dash 5 is a paid upgrade ($19.99 + VAT). To upgrade, download Dash 5 and add your existing Dash license in Preferences > Purchase and you’ll be prompted to upgrade.
Anyone that purchased Dash after the 1st of September 2019 gets to upgrade for free.
- New Search and Navigation Interface – The search and navigation interface was completely redesigned to be more intuitive and fast
- New Search Result Sorting and Nesting – Search result sorting and nesting were completely rethought and redone. The order of docsets in Preferences > Docsets or in your search profile will now matter a lot more, while also keeping your results uncluttered
- New Browser Engine – Dash 5 uses WKWebView, the latest browser engine from Apple. Supporting WKWebView required rewriting a huge part of Dash, some of which to JavaScript, so please make sure to report any bugs you might encounter, no matter how small
- Improved Dark Mode – The dark documentation style will now preserve colors instead of inverting them
- New Snippet Navigation – Snippets can now be bookmarked and are part of the navigation history. Don’t like snippets? You can now completely disable them
- New Support System – The in-app Contact Support option is now powered by replies.io, which makes it easier to improve your support request with screenshots, videos and logs, significantly reducing the time needed for your issue to be resolved
- Lots of Small Improvements – New in-page find interface and result highlighting, new status bar, faster search and a lot more are waiting for you in Dash 5
Dash 5 is a paid upgrade ($19.99 + VAT), but it’s free to download and try out. If you encounter any issues or need any help, contact me.