| 1 |
Dask DataFrame API with Logical Query Planning |
| 2 |
============================================== |
| 3 |
|
| 4 |
.. currentmodule:: dask_expr._collection |
| 5 |
|
| 6 |
DataFrame |
| 7 |
~~~~~~~~~ |
| 8 |
|
| 9 |
.. autosummary:: |
| 10 |
:toctree: generated/ |
| 11 |
|
| 12 |
DataFrame |
| 13 |
DataFrame.abs |
| 14 |
DataFrame.add |
| 15 |
DataFrame.align |
| 16 |
DataFrame.all |
| 17 |
DataFrame.any |
| 18 |
DataFrame.apply |
| 19 |
DataFrame.assign |
| 20 |
DataFrame.astype |
| 21 |
DataFrame.bfill |
| 22 |
DataFrame.categorize |
| 23 |
DataFrame.columns |
| 24 |
DataFrame.compute |
| 25 |
DataFrame.copy |
| 26 |
DataFrame.corr |
| 27 |
DataFrame.count |
| 28 |
DataFrame.cov |
| 29 |
DataFrame.cummax |
| 30 |
DataFrame.cummin |
| 31 |
DataFrame.cumprod |
| 32 |
DataFrame.cumsum |
| 33 |
DataFrame.describe |
| 34 |
DataFrame.diff |
| 35 |
DataFrame.div |
| 36 |
DataFrame.divide |
| 37 |
DataFrame.divisions |
| 38 |
DataFrame.drop |
| 39 |
DataFrame.drop_duplicates |
| 40 |
DataFrame.dropna |
| 41 |
DataFrame.dtypes |
| 42 |
DataFrame.eq |
| 43 |
DataFrame.eval |
| 44 |
DataFrame.explode |
| 45 |
DataFrame.ffill |
| 46 |
DataFrame.fillna |
| 47 |
DataFrame.floordiv |
| 48 |
DataFrame.ge |
| 49 |
DataFrame.get_partition |
| 50 |
DataFrame.groupby |
| 51 |
DataFrame.gt |
| 52 |
DataFrame.head |
| 53 |
DataFrame.idxmax |
| 54 |
DataFrame.idxmin |
| 55 |
DataFrame.iloc |
| 56 |
DataFrame.index |
| 57 |
DataFrame.info |
| 58 |
DataFrame.isin |
| 59 |
DataFrame.isna |
| 60 |
DataFrame.isnull |
| 61 |
DataFrame.items |
| 62 |
DataFrame.iterrows |
| 63 |
DataFrame.itertuples |
| 64 |
DataFrame.join |
| 65 |
DataFrame.known_divisions |
| 66 |
DataFrame.le |
| 67 |
DataFrame.loc |
| 68 |
DataFrame.lt |
| 69 |
DataFrame.map_partitions |
| 70 |
DataFrame.mask |
| 71 |
DataFrame.max |
| 72 |
DataFrame.mean |
| 73 |
DataFrame.median |
| 74 |
DataFrame.median_approximate |
| 75 |
DataFrame.melt |
| 76 |
DataFrame.memory_usage |
| 77 |
DataFrame.memory_usage_per_partition |
| 78 |
DataFrame.merge |
| 79 |
DataFrame.min |
| 80 |
DataFrame.mod |
| 81 |
DataFrame.mode |
| 82 |
DataFrame.mul |
| 83 |
DataFrame.ndim |
| 84 |
DataFrame.ne |
| 85 |
DataFrame.nlargest |
| 86 |
DataFrame.npartitions |
| 87 |
DataFrame.nsmallest |
| 88 |
DataFrame.partitions |
| 89 |
DataFrame.persist |
| 90 |
DataFrame.pivot_table |
| 91 |
DataFrame.pop |
| 92 |
DataFrame.pow |
| 93 |
DataFrame.prod |
| 94 |
DataFrame.quantile |
| 95 |
DataFrame.query |
| 96 |
DataFrame.radd |
| 97 |
DataFrame.random_split |
| 98 |
DataFrame.rdiv |
| 99 |
DataFrame.rename |
| 100 |
DataFrame.rename_axis |
| 101 |
DataFrame.repartition |
| 102 |
DataFrame.replace |
| 103 |
DataFrame.resample |
| 104 |
DataFrame.reset_index |
| 105 |
DataFrame.rfloordiv |
| 106 |
DataFrame.rmod |
| 107 |
DataFrame.rmul |
| 108 |
DataFrame.round |
| 109 |
DataFrame.rpow |
| 110 |
DataFrame.rsub |
| 111 |
DataFrame.rtruediv |
| 112 |
DataFrame.sample |
| 113 |
DataFrame.select_dtypes |
| 114 |
DataFrame.sem |
| 115 |
DataFrame.set_index |
| 116 |
DataFrame.shape |
| 117 |
DataFrame.shuffle |
| 118 |
DataFrame.size |
| 119 |
DataFrame.sort_values |
| 120 |
DataFrame.squeeze |
| 121 |
DataFrame.std |
| 122 |
DataFrame.sub |
| 123 |
DataFrame.sum |
| 124 |
DataFrame.tail |
| 125 |
DataFrame.to_backend |
| 126 |
DataFrame.to_bag |
| 127 |
DataFrame.to_csv |
| 128 |
DataFrame.to_dask_array |
| 129 |
DataFrame.to_dask_dataframe |
| 130 |
DataFrame.to_delayed |
| 131 |
DataFrame.to_hdf |
| 132 |
DataFrame.to_html |
| 133 |
DataFrame.to_json |
| 134 |
DataFrame.to_legacy_dataframe |
| 135 |
DataFrame.to_parquet |
| 136 |
DataFrame.to_records |
| 137 |
DataFrame.to_string |
| 138 |
DataFrame.to_sql |
| 139 |
DataFrame.to_timestamp |
| 140 |
DataFrame.truediv |
| 141 |
DataFrame.values |
| 142 |
DataFrame.var |
| 143 |
DataFrame.visualize |
| 144 |
DataFrame.where |
| 145 |
|
| 146 |
Series |
| 147 |
~~~~~~ |
| 148 |
|
| 149 |
.. autosummary:: |
| 150 |
:toctree: generated/ |
| 151 |
|
| 152 |
Series |
| 153 |
Series.add |
| 154 |
Series.align |
| 155 |
Series.all |
| 156 |
Series.any |
| 157 |
Series.apply |
| 158 |
Series.astype |
| 159 |
Series.autocorr |
| 160 |
Series.between |
| 161 |
Series.bfill |
| 162 |
Series.clear_divisions |
| 163 |
Series.clip |
| 164 |
Series.compute |
| 165 |
Series.copy |
| 166 |
Series.corr |
| 167 |
Series.count |
| 168 |
Series.cov |
| 169 |
Series.cummax |
| 170 |
Series.cummin |
| 171 |
Series.cumprod |
| 172 |
Series.cumsum |
| 173 |
Series.describe |
| 174 |
Series.diff |
| 175 |
Series.div |
| 176 |
Series.drop_duplicates |
| 177 |
Series.dropna |
| 178 |
Series.dtype |
| 179 |
Series.eq |
| 180 |
Series.explode |
| 181 |
Series.ffill |
| 182 |
Series.fillna |
| 183 |
Series.floordiv |
| 184 |
Series.ge |
| 185 |
Series.get_partition |
| 186 |
Series.groupby |
| 187 |
Series.gt |
| 188 |
Series.head |
| 189 |
Series.idxmax |
| 190 |
Series.idxmin |
| 191 |
Series.isin |
| 192 |
Series.isna |
| 193 |
Series.isnull |
| 194 |
Series.known_divisions |
| 195 |
Series.le |
| 196 |
Series.loc |
| 197 |
Series.lt |
| 198 |
Series.map |
| 199 |
Series.map_overlap |
| 200 |
Series.map_partitions |
| 201 |
Series.mask |
| 202 |
Series.max |
| 203 |
Series.mean |
| 204 |
Series.median |
| 205 |
Series.median_approximate |
| 206 |
Series.memory_usage |
| 207 |
Series.memory_usage_per_partition |
| 208 |
Series.min |
| 209 |
Series.mod |
| 210 |
Series.mul |
| 211 |
Series.nbytes |
| 212 |
Series.ndim |
| 213 |
Series.ne |
| 214 |
Series.nlargest |
| 215 |
Series.notnull |
| 216 |
Series.nsmallest |
| 217 |
Series.nunique |
| 218 |
Series.nunique_approx |
| 219 |
Series.persist |
| 220 |
Series.pipe |
| 221 |
Series.pow |
| 222 |
Series.prod |
| 223 |
Series.quantile |
| 224 |
Series.radd |
| 225 |
Series.random_split |
| 226 |
Series.rdiv |
| 227 |
Series.repartition |
| 228 |
Series.replace |
| 229 |
Series.rename |
| 230 |
Series.resample |
| 231 |
Series.reset_index |
| 232 |
Series.rolling |
| 233 |
Series.round |
| 234 |
Series.sample |
| 235 |
Series.sem |
| 236 |
Series.shape |
| 237 |
Series.shift |
| 238 |
Series.size |
| 239 |
Series.std |
| 240 |
Series.sub |
| 241 |
Series.sum |
| 242 |
Series.to_backend |
| 243 |
Series.to_bag |
| 244 |
Series.to_csv |
| 245 |
Series.to_dask_array |
| 246 |
Series.to_delayed |
| 247 |
Series.to_frame |
| 248 |
Series.to_hdf |
| 249 |
Series.to_string |
| 250 |
Series.to_timestamp |
| 251 |
Series.truediv |
| 252 |
Series.unique |
| 253 |
Series.value_counts |
| 254 |
Series.values |
| 255 |
Series.var |
| 256 |
Series.visualize |
| 257 |
Series.where |
| 258 |
|
| 259 |
Index |
| 260 |
~~~~~~ |
| 261 |
|
| 262 |
.. autosummary:: |
| 263 |
:toctree: generated/ |
| 264 |
|
| 265 |
Index |
| 266 |
Index.add |
| 267 |
Index.align |
| 268 |
Index.all |
| 269 |
Index.any |
| 270 |
Index.apply |
| 271 |
Index.astype |
| 272 |
Index.autocorr |
| 273 |
Index.between |
| 274 |
Index.bfill |
| 275 |
Index.clear_divisions |
| 276 |
Index.clip |
| 277 |
Index.compute |
| 278 |
Index.copy |
| 279 |
Index.corr |
| 280 |
Index.count |
| 281 |
Index.cov |
| 282 |
Index.cummax |
| 283 |
Index.cummin |
| 284 |
Index.cumprod |
| 285 |
Index.cumsum |
| 286 |
Index.describe |
| 287 |
Index.diff |
| 288 |
Index.div |
| 289 |
Index.drop_duplicates |
| 290 |
Index.dropna |
| 291 |
Index.dtype |
| 292 |
Index.eq |
| 293 |
Index.explode |
| 294 |
Index.ffill |
| 295 |
Index.fillna |
| 296 |
Index.floordiv |
| 297 |
Index.ge |
| 298 |
Index.get_partition |
| 299 |
Index.groupby |
| 300 |
Index.gt |
| 301 |
Index.head |
| 302 |
Index.is_monotonic_decreasing |
| 303 |
Index.is_monotonic_increasing |
| 304 |
Index.isin |
| 305 |
Index.isna |
| 306 |
Index.isnull |
| 307 |
Index.known_divisions |
| 308 |
Index.le |
| 309 |
Index.loc |
| 310 |
Index.lt |
| 311 |
Index.map |
| 312 |
Index.map_overlap |
| 313 |
Index.map_partitions |
| 314 |
Index.mask |
| 315 |
Index.max |
| 316 |
Index.median |
| 317 |
Index.median_approximate |
| 318 |
Index.memory_usage |
| 319 |
Index.memory_usage_per_partition |
| 320 |
Index.min |
| 321 |
Index.mod |
| 322 |
Index.mul |
| 323 |
Index.nbytes |
| 324 |
Index.ndim |
| 325 |
Index.ne |
| 326 |
Index.nlargest |
| 327 |
Index.notnull |
| 328 |
Index.nsmallest |
| 329 |
Index.nunique |
| 330 |
Index.nunique_approx |
| 331 |
Index.persist |
| 332 |
Index.pipe |
| 333 |
Index.pow |
| 334 |
Index.quantile |
| 335 |
Index.radd |
| 336 |
Index.random_split |
| 337 |
Index.rdiv |
| 338 |
Index.rename |
| 339 |
Index.repartition |
| 340 |
Index.replace |
| 341 |
Index.resample |
| 342 |
Index.reset_index |
| 343 |
Index.rolling |
| 344 |
Index.round |
| 345 |
Index.sample |
| 346 |
Index.sem |
| 347 |
Index.shape |
| 348 |
Index.shift |
| 349 |
Index.size |
| 350 |
Index.sub |
| 351 |
Index.to_backend |
| 352 |
Index.to_bag |
| 353 |
Index.to_csv |
| 354 |
Index.to_dask_array |
| 355 |
Index.to_delayed |
| 356 |
Index.to_frame |
| 357 |
Index.to_hdf |
| 358 |
Index.to_series |
| 359 |
Index.to_string |
| 360 |
Index.to_timestamp |
| 361 |
Index.truediv |
| 362 |
Index.unique |
| 363 |
Index.value_counts |
| 364 |
Index.values |
| 365 |
Index.visualize |
| 366 |
Index.where |
| 367 |
Index.to_frame |
| 368 |
|
| 369 |
Accessors |
| 370 |
~~~~~~~~~ |
| 371 |
Similar to pandas, Dask provides dtype-specific methods under various accessors. |
| 372 |
These are separate namespaces within :class:`Series` that only apply to specific data types. |
| 373 |
|
| 374 |
The accessor implementations are consistent with the current Dask DataFrame implementation. |
| 375 |
|
| 376 |
Groupby Operations |
| 377 |
~~~~~~~~~~~~~~~~~~ |
| 378 |
|
| 379 |
.. currentmodule:: dask_expr._groupby |
| 380 |
|
| 381 |
DataFrame Groupby |
| 382 |
***************** |
| 383 |
|
| 384 |
.. autosummary:: |
| 385 |
:toctree: generated/ |
| 386 |
|
| 387 |
GroupBy.aggregate |
| 388 |
GroupBy.apply |
| 389 |
GroupBy.bfill |
| 390 |
GroupBy.count |
| 391 |
GroupBy.cumcount |
| 392 |
GroupBy.cumprod |
| 393 |
GroupBy.cumsum |
| 394 |
GroupBy.ffill |
| 395 |
GroupBy.get_group |
| 396 |
GroupBy.max |
| 397 |
GroupBy.mean |
| 398 |
GroupBy.min |
| 399 |
GroupBy.size |
| 400 |
GroupBy.std |
| 401 |
GroupBy.sum |
| 402 |
GroupBy.var |
| 403 |
GroupBy.cov |
| 404 |
GroupBy.corr |
| 405 |
GroupBy.first |
| 406 |
GroupBy.last |
| 407 |
GroupBy.idxmin |
| 408 |
GroupBy.idxmax |
| 409 |
GroupBy.rolling |
| 410 |
GroupBy.transform |
| 411 |
|
| 412 |
|
| 413 |
Series Groupby |
| 414 |
************** |
| 415 |
|
| 416 |
.. autosummary:: |
| 417 |
:toctree: generated/ |
| 418 |
|
| 419 |
SeriesGroupBy.aggregate |
| 420 |
SeriesGroupBy.apply |
| 421 |
SeriesGroupBy.bfill |
| 422 |
SeriesGroupBy.count |
| 423 |
SeriesGroupBy.cumcount |
| 424 |
SeriesGroupBy.cumprod |
| 425 |
SeriesGroupBy.cumsum |
| 426 |
SeriesGroupBy.ffill |
| 427 |
SeriesGroupBy.get_group |
| 428 |
SeriesGroupBy.max |
| 429 |
SeriesGroupBy.mean |
| 430 |
SeriesGroupBy.min |
| 431 |
SeriesGroupBy.nunique |
| 432 |
SeriesGroupBy.size |
| 433 |
SeriesGroupBy.std |
| 434 |
SeriesGroupBy.sum |
| 435 |
SeriesGroupBy.var |
| 436 |
SeriesGroupBy.first |
| 437 |
SeriesGroupBy.last |
| 438 |
SeriesGroupBy.idxmin |
| 439 |
SeriesGroupBy.idxmax |
| 440 |
SeriesGroupBy.rolling |
| 441 |
SeriesGroupBy.transform |
| 442 |
|
| 443 |
Custom Aggregation |
| 444 |
****************** |
| 445 |
|
| 446 |
.. autosummary:: |
| 447 |
:toctree: generated/ |
| 448 |
|
| 449 |
Aggregation |
| 450 |
|
| 451 |
Rolling Operations |
| 452 |
~~~~~~~~~~~~~~~~~~ |
| 453 |
|
| 454 |
.. currentmodule:: dask_expr._collection |
| 455 |
|
| 456 |
.. autosummary:: |
| 457 |
:toctree: generated/ |
| 458 |
|
| 459 |
Series.rolling |
| 460 |
DataFrame.rolling |
| 461 |
|
| 462 |
.. currentmodule:: dask_expr._rolling |
| 463 |
|
| 464 |
.. autosummary:: |
| 465 |
:toctree: generated/ |
| 466 |
|
| 467 |
Rolling.apply |
| 468 |
Rolling.count |
| 469 |
Rolling.kurt |
| 470 |
Rolling.max |
| 471 |
Rolling.mean |
| 472 |
Rolling.median |
| 473 |
Rolling.min |
| 474 |
Rolling.quantile |
| 475 |
Rolling.skew |
| 476 |
Rolling.std |
| 477 |
Rolling.sum |
| 478 |
Rolling.var |
| 479 |
|
| 480 |
|
| 481 |
Create DataFrames |
| 482 |
~~~~~~~~~~~~~~~~~ |
| 483 |
|
| 484 |
.. currentmodule:: dask_expr |
| 485 |
|
| 486 |
.. autosummary:: |
| 487 |
:toctree: generated/ |
| 488 |
|
| 489 |
read_csv |
| 490 |
read_table |
| 491 |
read_fwf |
| 492 |
read_parquet |
| 493 |
read_hdf |
| 494 |
read_json |
| 495 |
read_orc |
| 496 |
read_sql_table |
| 497 |
read_sql_query |
| 498 |
read_sql |
| 499 |
from_array |
| 500 |
from_dask_array |
| 501 |
from_delayed |
| 502 |
from_map |
| 503 |
from_pandas |
| 504 |
DataFrame.from_dict |
| 505 |
|
| 506 |
Store DataFrames |
| 507 |
~~~~~~~~~~~~~~~~ |
| 508 |
|
| 509 |
.. currentmodule:: dask_expr |
| 510 |
|
| 511 |
.. autosummary:: |
| 512 |
:toctree: generated/ |
| 513 |
|
| 514 |
to_csv |
| 515 |
to_parquet |
| 516 |
to_hdf |
| 517 |
to_records |
| 518 |
to_sql |
| 519 |
to_json |
| 520 |
|
| 521 |
Convert DataFrames |
| 522 |
~~~~~~~~~~~~~~~~~~ |
| 523 |
|
| 524 |
.. autosummary:: |
| 525 |
:toctree: generated/ |
| 526 |
|
| 527 |
DataFrame.to_bag |
| 528 |
DataFrame.to_dask_array |
| 529 |
DataFrame.to_delayed |
| 530 |
|
| 531 |
|
| 532 |
Convert from/to legacy DataFrames |
| 533 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 534 |
|
| 535 |
.. currentmodule:: dask_expr._collection |
| 536 |
|
| 537 |
.. autosummary:: |
| 538 |
:toctree: generated/ |
| 539 |
|
| 540 |
DataFrame.to_legacy_dataframe |
| 541 |
from_legacy_dataframe |
| 542 |
|
| 543 |
Reshape DataFrames |
| 544 |
~~~~~~~~~~~~~~~~~~ |
| 545 |
|
| 546 |
.. currentmodule:: dask_expr |
| 547 |
|
| 548 |
.. autosummary:: |
| 549 |
:toctree: generated/ |
| 550 |
|
| 551 |
get_dummies |
| 552 |
pivot_table |
| 553 |
melt |
| 554 |
|
| 555 |
Concatenate DataFrames |
| 556 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 557 |
|
| 558 |
.. currentmodule:: dask_expr._collection |
| 559 |
|
| 560 |
.. autosummary:: |
| 561 |
:toctree: generated/ |
| 562 |
|
| 563 |
DataFrame.merge |
| 564 |
concat |
| 565 |
merge |
| 566 |
merge_asof |
| 567 |
|
| 568 |
|
| 569 |
Resampling |
| 570 |
~~~~~~~~~~ |
| 571 |
|
| 572 |
.. currentmodule:: dask_expr._resample |
| 573 |
|
| 574 |
.. autosummary:: |
| 575 |
:toctree: generated/ |
| 576 |
|
| 577 |
Resampler |
| 578 |
Resampler.agg |
| 579 |
Resampler.count |
| 580 |
Resampler.first |
| 581 |
Resampler.last |
| 582 |
Resampler.max |
| 583 |
Resampler.mean |
| 584 |
Resampler.median |
| 585 |
Resampler.min |
| 586 |
Resampler.nunique |
| 587 |
Resampler.ohlc |
| 588 |
Resampler.prod |
| 589 |
Resampler.quantile |
| 590 |
Resampler.sem |
| 591 |
Resampler.size |
| 592 |
Resampler.std |
| 593 |
Resampler.sum |
| 594 |
Resampler.var |
| 595 |
|
| 596 |
|
| 597 |
Dask Metadata |
| 598 |
~~~~~~~~~~~~~ |
| 599 |
|
| 600 |
.. currentmodule:: dask.dataframe.utils |
| 601 |
|
| 602 |
.. autosummary:: |
| 603 |
:toctree: generated/ |
| 604 |
|
| 605 |
make_meta |
| 606 |
|
| 607 |
|
| 608 |
Query Planning and Optimization |
| 609 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 610 |
|
| 611 |
.. currentmodule:: dask_expr._collection |
| 612 |
|
| 613 |
.. autosummary:: |
| 614 |
:toctree: generated/ |
| 615 |
|
| 616 |
DataFrame.explain |
| 617 |
DataFrame.visualize |
| 618 |
DataFrame.analyze |
| 619 |
|
| 620 |
Other functions |
| 621 |
~~~~~~~~~~~~~~~ |
| 622 |
|
| 623 |
.. currentmodule:: dask_expr._collection |
| 624 |
|
| 625 |
.. autosummary:: |
| 626 |
:toctree: generated/ |
| 627 |
|
| 628 |
compute |
| 629 |
map_partitions |
| 630 |
map_overlap |
| 631 |
|
| 632 |
to_datetime |
| 633 |
to_numeric |
| 634 |
to_timedelta |