predicates module¶
ASTPredicate¶
-
class
graphistry.compute.predicates.ASTPredicate.
ASTPredicate
Bases:
graphistry.compute.ASTSerializable.ASTSerializable
Internal, not intended for use outside of this module. These are fancy columnar predicates used in {k: v, …} node/edge df matching when going beyond primitive equality
categorical¶
-
class
graphistry.compute.predicates.categorical.
Duplicated
(keep='first') Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
keep (
Literal
[‘first’, ‘last’, False]) –
-
validate
() - Return type
None
-
graphistry.compute.predicates.categorical.
duplicated
(keep='first') Return whether a given value is duplicated
- Parameters
keep (
Literal
[‘first’, ‘last’, False]) –- Return type
Duplicated
is_in¶
-
class
graphistry.compute.predicates.is_in.
IsIn
(options) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
options (
List
[Any
]) –
-
validate
() - Return type
None
-
graphistry.compute.predicates.is_in.
is_in
(options) - Parameters
options (
List
[Any
]) –- Return type
IsIn
numeric¶
-
class
graphistry.compute.predicates.numeric.
Between
(lower, upper, inclusive=True) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
lower (
float
) –upper (
float
) –inclusive (
bool
) –
-
validate
() - Return type
None
-
class
graphistry.compute.predicates.numeric.
EQ
(val) Bases:
graphistry.compute.predicates.numeric.NumericASTPredicate
- Parameters
val (
float
) –
-
class
graphistry.compute.predicates.numeric.
GE
(val) Bases:
graphistry.compute.predicates.numeric.NumericASTPredicate
- Parameters
val (
float
) –
-
class
graphistry.compute.predicates.numeric.
GT
(val) Bases:
graphistry.compute.predicates.numeric.NumericASTPredicate
- Parameters
val (
float
) –
-
class
graphistry.compute.predicates.numeric.
IsNA
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.numeric.
LE
(val) Bases:
graphistry.compute.predicates.numeric.NumericASTPredicate
- Parameters
val (
float
) –
-
class
graphistry.compute.predicates.numeric.
LT
(val) Bases:
graphistry.compute.predicates.numeric.NumericASTPredicate
- Parameters
val (
float
) –
-
class
graphistry.compute.predicates.numeric.
NE
(val) Bases:
graphistry.compute.predicates.numeric.NumericASTPredicate
- Parameters
val (
float
) –
-
class
graphistry.compute.predicates.numeric.
NotNA
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.numeric.
NumericASTPredicate
(val) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
val (
Union
[int
,float
]) –
-
validate
() - Return type
None
-
graphistry.compute.predicates.numeric.
between
(lower, upper, inclusive=True) Return whether a given value is between a lower and upper threshold
- Parameters
lower (
float
) –upper (
float
) –inclusive (
bool
) –
- Return type
Between
-
graphistry.compute.predicates.numeric.
eq
(val) Return whether a given value is equal to a threshold
- Parameters
val (
float
) –- Return type
EQ
-
graphistry.compute.predicates.numeric.
ge
(val) Return whether a given value is greater than or equal to a threshold
- Parameters
val (
float
) –- Return type
GE
-
graphistry.compute.predicates.numeric.
gt
(val) Return whether a given value is greater than a threshold
- Parameters
val (
float
) –- Return type
GT
-
graphistry.compute.predicates.numeric.
isna
() Return whether a given value is NA
- Return type
IsNA
-
graphistry.compute.predicates.numeric.
le
(val) Return whether a given value is less than or equal to a threshold
- Parameters
val (
float
) –- Return type
LE
-
graphistry.compute.predicates.numeric.
lt
(val) Return whether a given value is less than a threshold
- Parameters
val (
float
) –- Return type
LT
-
graphistry.compute.predicates.numeric.
ne
(val) Return whether a given value is not equal to a threshold
- Parameters
val (
float
) –- Return type
NE
-
graphistry.compute.predicates.numeric.
notna
() Return whether a given value is not NA
- Return type
NotNA
str¶
-
class
graphistry.compute.predicates.str.
Contains
(pat, case=True, flags=0, na=None, regex=True) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
pat (
str
) –case (
bool
) –flags (
int
) –na (
Optional
[bool
]) –regex (
bool
) –
-
validate
() - Return type
None
-
class
graphistry.compute.predicates.str.
Endswith
(pat, na=None) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
pat (
str
) –na (
Optional
[str
]) –
-
validate
() - Return type
None
-
class
graphistry.compute.predicates.str.
IsAlnum
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsAlpha
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsDecimal
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsDigit
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsLower
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsNull
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsNumeric
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsSpace
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsTitle
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
IsUpper
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
Match
(pat, case=True, flags=0, na=None) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
pat (
str
) –case (
bool
) –flags (
int
) –na (
Optional
[bool
]) –
-
validate
() - Return type
None
-
class
graphistry.compute.predicates.str.
NotNull
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.str.
Startswith
(pat, na=None) Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
- Parameters
pat (
str
) –na (
Optional
[str
]) –
-
validate
() - Return type
None
-
graphistry.compute.predicates.str.
contains
(pat, case=True, flags=0, na=None, regex=True) Return whether a given pattern or regex is contained within a string
- Parameters
pat (
str
) –case (
bool
) –flags (
int
) –na (
Optional
[bool
]) –regex (
bool
) –
- Return type
Contains
-
graphistry.compute.predicates.str.
endswith
(pat, na=None) - Parameters
pat (
str
) –na (
Optional
[str
]) –
- Return type
Endswith
-
graphistry.compute.predicates.str.
isalnum
() Return whether a given string is alphanumeric
- Return type
IsAlnum
-
graphistry.compute.predicates.str.
isalpha
() Return whether a given string is alphabetic
- Return type
IsAlpha
-
graphistry.compute.predicates.str.
isdecimal
() Return whether a given string is decimal
- Return type
IsDecimal
-
graphistry.compute.predicates.str.
isdigit
() Return whether a given string is numeric
- Return type
IsDigit
-
graphistry.compute.predicates.str.
islower
() Return whether a given string is lowercase
- Return type
IsLower
-
graphistry.compute.predicates.str.
isnull
() Return whether a given string is null
- Return type
IsNull
-
graphistry.compute.predicates.str.
isnumeric
() Return whether a given string is numeric
- Return type
IsNumeric
-
graphistry.compute.predicates.str.
isspace
() Return whether a given string is whitespace
- Return type
IsSpace
-
graphistry.compute.predicates.str.
istitle
() Return whether a given string is title case
- Return type
IsTitle
-
graphistry.compute.predicates.str.
isupper
() Return whether a given string is uppercase
- Return type
IsUpper
-
graphistry.compute.predicates.str.
match
(pat, case=True, flags=0, na=None) Return whether a given pattern is at the start of a string
- Parameters
pat (
str
) –case (
bool
) –flags (
int
) –na (
Optional
[bool
]) –
- Return type
Match
-
graphistry.compute.predicates.str.
notnull
() Return whether a given string is not null
- Return type
NotNull
-
graphistry.compute.predicates.str.
startswith
(pat, na=None) Return whether a given pattern is at the start of a string
- Parameters
pat (
str
) –na (
Optional
[str
]) –
- Return type
Startswith
temporal¶
-
class
graphistry.compute.predicates.temporal.
IsLeapYear
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.temporal.
IsMonthEnd
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.temporal.
IsMonthStart
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.temporal.
IsQuarterEnd
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.temporal.
IsQuarterStart
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.temporal.
IsYearEnd
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
class
graphistry.compute.predicates.temporal.
IsYearStart
Bases:
graphistry.compute.predicates.ASTPredicate.ASTPredicate
-
graphistry.compute.predicates.temporal.
is_leap_year
() Return whether a given value is a leap year
- Return type
IsLeapYear
-
graphistry.compute.predicates.temporal.
is_month_end
() Return whether a given value is a month end
- Return type
IsMonthEnd
-
graphistry.compute.predicates.temporal.
is_month_start
() Return whether a given value is a month start
- Return type
IsMonthStart
-
graphistry.compute.predicates.temporal.
is_quarter_end
() Return whether a given value is a quarter end
- Return type
IsQuarterEnd
-
graphistry.compute.predicates.temporal.
is_quarter_start
() Return whether a given value is a quarter start
- Return type
IsQuarterStart
-
graphistry.compute.predicates.temporal.
is_year_end
() Return whether a given value is a year end
- Return type
IsYearEnd
-
graphistry.compute.predicates.temporal.
is_year_start
() Return whether a given value is a year start
- Return type
IsYearStart