SeriesOp
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
_CategoryOpdatacook.engine.ops.categorical |
||
| ToDatetime datacook.engine.ops.dates |
||
| Strftime datacook.engine.ops.dates |
||
| TzLocalize datacook.engine.ops.dates |
||
| TzConvert datacook.engine.ops.dates |
||
| RoundTime datacook.engine.ops.dates |
||
| FillForward datacook.engine.ops.missing |
||
| Interpolate datacook.engine.ops.missing |
||
| Rank datacook.engine.ops.stats |
||
| Bin datacook.engine.ops.stats `pd.cut`: equal-width bins (a number) or bins between edges (a list). |
||
| TextOp datacook.engine.ops.strings |
||
| Shift datacook.engine.ops.timeseries |
||
| Diff datacook.engine.ops.timeseries |
||
| PctChange datacook.engine.ops.timeseries |
||
| Abs datacook.engine.ops.values |
||
| Clip datacook.engine.ops.values |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ColumnOp datacook.engine.ops.series The base of all per-column ops: one series per selected column, put back by `assign()`. |
â‹” Inheritance diagram¶
graph TD
2451904138["series.SeriesOp"]
124287307["series.ColumnOp"]
1539482213["base.Op"]
2751680898["builtins.object"]
124287307 --> 2451904138
1539482213 --> 124287307
2751680898 --> 1539482213
🛈 DocStrings¶
Bases: ColumnOp
A ColumnOp that is one call per column, declared like CallOp.
accessor("str","dt","cat"or None) +method:df["a"].str.upper();- or
function(dotted name;pd= pandas):pd.to_datetime(df["a"], ...); method_param: a param whose value picks the method (methodsmaps values to method names, default: the value itself); it is not passed to the call.
Params in positional are passed positionally, the others as keywords when they differ
from their default (or are listed in always). The selection params (columns,
column, suffix) are never passed.
frame_call = True: the method works on a frame column by column (abs, clip,
ffill), so the code calls it once on the selected columns and puts the result back,
out = a.assign(**a[["x", "y"]].clip(lower=0)), or on the whole frame when the
columns field allows None (out = a.ffill()). No accessor, function or suffix then.
Source code in src/datacook/engine/ops/series.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | |
call
classmethod
¶
The declared call on a series (or, with frame_call, a frame).
Source code in src/datacook/engine/ops/series.py
call_code
classmethod
¶
Code of call() on the expression source.