Most Xorbits objects, including Xorbits
DataFrame, are implemented to use deferred
execution. Deferred execution means that operations on Xorbits objects are not executed immediately
as they are called. Instead, Xorbits builds an execution plan and the plan will not be
executed until the result is actually required.
Currently, execution will be triggered in the following situations:
Output methods are called. For example,
Critical information is missing. For example, the dtypes of a
Deferred execution can greatly improve performance when you manipulate large datasets. Optimizations can be applied to the chained operations before calling the backend. For example, identical parts of an execution plan can be eliminated and executed only once.
To trigger the execution manually, you can use
run(). You pass an Xorbits object or a list
of Xorbits objects as the argument.
>>> import xorbits.numpy as np >>> a = np.arange(3) >>> xorbits.run(a) >>> a array([0, 1, 2])