Skip to content

pipda.piping

module

pipda.piping

Classes
  • PipeableCall() A pipeable call that waits for the data to be piped in</>
Functions
abstract class

pipda.piping.PipeableCall()

A pipeable call that waits for the data to be piped in

>>> data >> pipeable_call(...)
Methods
  • __array_ufunc__(ufunc, method, *inputs, **kwargs) (FunctionCall) Allow numpy ufunc to work on Expression objects</>
  • __getattr__(name) (ReferenceAttr) Whenever expr.attr is encountered,return a ReferenceAttr object </>
  • __getitem__(item) (ReferenceItem) Whenever expr[item] is encountered,return a ReferenceAttr object </>
  • __hash__() (int) Make it hashable</>
  • __index__() Allow Expression object to work as index or part of slice</>
  • __iter__() Forbiden iterating on Expression objects</>
  • __str__() (str) Used for stringify the whole expression</>
method

__array_ufunc__(ufunc, method, *inputs, **kwargs) → FunctionCall

Allow numpy ufunc to work on Expression objects

method

__hash__() → int

Make it hashable

method

__getattr__(name) → ReferenceAttr

Whenever expr.attr is encountered,return a ReferenceAttr object

method

__getitem__(item) → ReferenceItem

Whenever expr[item] is encountered,return a ReferenceAttr object

method

__index__()

Allow Expression object to work as index or part of slice

method

__iter__()

Forbiden iterating on Expression objects

If it is happening, probably wrong usage of functions/verbs

abstract method

__str__() → str

Used for stringify the whole expression

function

pipda.piping.patch_classes(*classes)

Patch the classes in case it has piping operator defined

For example, DataFrame.or has already been defined, so we need to patch it to force it to use ror of PipeableCall if | is registered for piping.

Parameters
  • classes The classes to patch
function

pipda.piping.unpatch_classes(*classes)

Unpatch the classes

Parameters
  • classes The classes to unpatch
function

pipda.piping.register_piping(op)

Register the piping operator for verbs

Parameters
  • op (str) The operator used for pipingAvaiable: ">>", "|", "//", "@", "%", "&" and "^"