Reference
Expressions
An Expr describes a computation on columns. Expressions are built with col(), lit(), when(), and the other functions below, and are evaluated by verbs such as select(), withColumns(), filter(), and agg(). They never hold PHP closures, so Polars runs them on its own threads.
Operands of comparison and arithmetic methods may be an Expr or a PHP value. PHP strings there are string literals.
Missing values
Expressions follow Polars’ null semantics. Arithmetic and comparisons with null give null. Aggregations such as sum(), mean(), min(), and max() skip nulls, count() counts non-null values, and len() counts rows. filter() drops rows whose condition is null. isNull(), fillNull(), dropNulls(), eqMissing(), and neMissing() handle nulls explicitly. NaN is a float value, so isNull() is false for it and isNan() is true. phibble and phplyr compares these rules with dplyr’s.
Windows and order
over() evaluates an expression within groups and maps the result back to every row. orderBy sets the order for order-dependent expressions such as cumSum() and shift().
$sales = read_csv('sales.csv', tryParseDates: true)->filter(col('store')->eq('S1'))->head(8);
echo $sales->select(
'date',
'product',
'units',
col('units')->sum()->over('product')->alias('product_total'),
col('units')->cumSum()->over('product', orderBy: 'date')->alias('running'),
col('units')->shift()->over('product', orderBy: 'date')->alias('previous'),
col('units')->rank('dense', descending: true)->alias('rank'),
);shape: (8, 7)
┌────────────┬─────────┬───────┬───────────────┬─────────┬──────────┬──────┐
│ date ┆ product ┆ units ┆ product_total ┆ running ┆ previous ┆ rank │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ date ┆ str ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ u32 │
╞════════════╪═════════╪═══════╪═══════════════╪═════════╪══════════╪══════╡
│ 2024-01-04 ┆ banana ┆ 10 ┆ 23 ┆ 11 ┆ 1 ┆ 3 │
│ 2024-02-02 ┆ banana ┆ 6 ┆ 23 ┆ 17 ┆ 10 ┆ 5 │
│ 2024-01-22 ┆ apple ┆ 5 ┆ 16 ┆ 5 ┆ null ┆ 6 │
│ 2024-01-23 ┆ apple ┆ 11 ┆ 16 ┆ 16 ┆ 5 ┆ 2 │
│ 2024-01-03 ┆ banana ┆ 1 ┆ 23 ┆ 1 ┆ null ┆ 7 │
│ 2024-03-05 ┆ date ┆ 7 ┆ 19 ┆ 19 ┆ 12 ┆ 4 │
│ 2024-03-22 ┆ banana ┆ 6 ┆ 23 ┆ 23 ┆ 6 ┆ 5 │
│ 2024-02-03 ┆ date ┆ 12 ┆ 19 ┆ 12 ┆ null ┆ 1 │
└────────────┴─────────┴───────┴───────────────┴─────────┴──────────┴──────┘
Strings
$people = new DataFrame(['name' => [' Ada Lovelace', 'grace hopper ', null, 'Alan Turing'], 'email' => ['[email protected]', '[email protected]', 'n/a', '[email protected]']]);
echo $people->select(
col('name')->str()->stripChars()->str()->toUppercase()->alias('upper'),
col('name')->str()->stripChars()->str()->split(' ')->list()->first()->alias('first'),
col('email')->str()->extract('@(.+)$')->alias('domain'),
col('email')->str()->contains('.org', literal: true)->alias('org'),
col('email')->str()->lenChars()->alias('len'),
);shape: (4, 5)
┌──────────────┬───────┬───────────┬───────┬─────┐
│ upper ┆ first ┆ domain ┆ org ┆ len │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ bool ┆ u32 │
╞══════════════╪═══════╪═══════════╪═══════╪═════╡
│ ADA LOVELACE ┆ Ada ┆ x.org ┆ true ┆ 9 │
│ GRACE HOPPER ┆ grace ┆ navy.mil ┆ false ┆ 14 │
│ null ┆ null ┆ null ┆ false ┆ 3 │
│ ALAN TURING ┆ Alan ┆ cam.ac.uk ┆ false ┆ 14 │
└──────────────┴───────┴───────────┴───────┴─────┘
Dates and times
$sales = read_csv('sales.csv', tryParseDates: true)->select('date')->head(4);
echo $sales->withColumns(
col('date')->dt()->year()->alias('year'),
col('date')->dt()->month()->alias('month'),
col('date')->dt()->weekday()->alias('weekday'),
col('date')->dt()->strftime('%b %d')->alias('label'),
col('date')->dt()->truncate('1mo')->alias('month_start'),
), "\n";
// Date and Datetime values come back as DateTimeImmutable.
$first = $sales->item(0, 'date');
echo get_class($first), ' ', $first->format('Y-m-d'), "\n";shape: (4, 6)
┌────────────┬──────┬───────┬─────────┬────────┬─────────────┐
│ date ┆ year ┆ month ┆ weekday ┆ label ┆ month_start │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ date ┆ i32 ┆ i8 ┆ i8 ┆ str ┆ date │
╞════════════╪══════╪═══════╪═════════╪════════╪═════════════╡
│ 2024-03-22 ┆ 2024 ┆ 3 ┆ 5 ┆ Mar 22 ┆ 2024-03-01 │
│ 2024-02-11 ┆ 2024 ┆ 2 ┆ 7 ┆ Feb 11 ┆ 2024-02-01 │
│ 2024-01-06 ┆ 2024 ┆ 1 ┆ 6 ┆ Jan 06 ┆ 2024-01-01 │
│ 2024-03-29 ┆ 2024 ┆ 3 ┆ 5 ┆ Mar 29 ┆ 2024-03-01 │
└────────────┴──────┴───────┴─────────┴────────┴─────────────┘
DateTimeImmutable 2024-03-22
Lists and structs
$orders = new DataFrame([
'order' => [1, 2, 3],
'items' => [['apple', 'banana'], ['cherry'], []],
'ship' => [['city' => 'Baltimore', 'days' => 2], ['city' => 'Denver', 'days' => 5], null],
]);
echo $orders, "\n";
echo $orders->select(
'order',
col('items')->list()->len()->alias('n_items'),
col('items')->list()->join(', ')->alias('items'),
col('ship')->struct()->field('city'),
), "\n";
echo $orders->explode('items'), "\n";
print_r($orders->row(0, named: true));shape: (3, 3)
┌───────┬─────────────────────┬─────────────────┐
│ order ┆ items ┆ ship │
│ --- ┆ --- ┆ --- │
│ i64 ┆ list[str] ┆ struct[2] │
╞═══════╪═════════════════════╪═════════════════╡
│ 1 ┆ ["apple", "banana"] ┆ {"Baltimore",2} │
│ 2 ┆ ["cherry"] ┆ {"Denver",5} │
│ 3 ┆ [] ┆ null │
└───────┴─────────────────────┴─────────────────┘
shape: (3, 4)
┌───────┬─────────┬───────────────┬───────────┐
│ order ┆ n_items ┆ items ┆ city │
│ --- ┆ --- ┆ --- ┆ --- │
│ i64 ┆ u32 ┆ str ┆ str │
╞═══════╪═════════╪═══════════════╪═══════════╡
│ 1 ┆ 2 ┆ apple, banana ┆ Baltimore │
│ 2 ┆ 1 ┆ cherry ┆ Denver │
│ 3 ┆ 0 ┆ ┆ null │
└───────┴─────────┴───────────────┴───────────┘
shape: (4, 3)
┌───────┬────────┬─────────────────┐
│ order ┆ items ┆ ship │
│ --- ┆ --- ┆ --- │
│ i64 ┆ str ┆ struct[2] │
╞═══════╪════════╪═════════════════╡
│ 1 ┆ apple ┆ {"Baltimore",2} │
│ 1 ┆ banana ┆ {"Baltimore",2} │
│ 2 ┆ cherry ┆ {"Denver",5} │
│ 3 ┆ null ┆ null │
└───────┴────────┴─────────────────┘
Array
(
[order] => 1
[items] => Array
(
[0] => apple
[1] => banana
)
[ship] => Array
(
[city] => Baltimore
[days] => 2
)
)
Selectors
Selectors pick columns by type, name, or position, as py-polars’ polars.selectors does. They live in the Phpolars\cs namespace, so use Phpolars\cs; makes them read like py’s cs.numeric(). A selector is an Expr. or(), and(), xor(), sub(), and not() combine two selectors as sets. PHP reserves list, array, and empty, so those selectors are named list_(), array_(), and empty_().
use Phpolars\cs;
$sales = read_csv('sales.csv', tryParseDates: true)->head(3);
echo $sales->select(cs\numeric()->sub(cs\by_name('id'))), "\n";
echo $sales->select(cs\string()->or(cs\date())), "\n";
echo $sales->withColumns(cs\float()->round(0)->name()->suffix('_rounded'))->select(cs\ends_with('price', '_rounded'));shape: (3, 2)
┌───────┬───────┐
│ units ┆ price │
│ --- ┆ --- │
│ i64 ┆ f64 │
╞═══════╪═══════╡
│ 10 ┆ 7.03 │
│ 0 ┆ 2.46 │
│ 2 ┆ 3.84 │
└───────┴───────┘
shape: (3, 3)
┌────────────┬───────┬─────────┐
│ date ┆ store ┆ product │
│ --- ┆ --- ┆ --- │
│ date ┆ str ┆ str │
╞════════════╪═══════╪═════════╡
│ 2024-03-22 ┆ S4 ┆ banana │
│ 2024-02-11 ┆ S4 ┆ cherry │
│ 2024-01-06 ┆ S2 ┆ apple │
└────────────┴───────┴─────────┘
shape: (3, 2)
┌───────┬───────────────┐
│ price ┆ price_rounded │
│ --- ┆ --- │
│ f64 ┆ f64 │
╞═══════╪═══════════════╡
│ 7.03 ┆ 7.0 │
│ 2.46 ┆ 2.0 │
│ 3.84 ┆ 4.0 │
└───────┴───────────────┘
cs\all(): Phpolars\Expr
cs\array_(?Phpolars\Expr $inner = null, ?int $width = null): Phpolars\Expr
cs\binary(): Phpolars\Expr
cs\boolean(): Phpolars\Expr
cs\by_dtype(mixed ...$dtypes_): Phpolars\Expr
cs\by_index(mixed $indices, ?bool $requireAll = null): Phpolars\Expr
cs\by_name(mixed $names_, ?bool $requireAll = null): Phpolars\Expr
cs\categorical(): Phpolars\Expr
cs\contains(mixed ...$substring): Phpolars\Expr
cs\date(): Phpolars\Expr
cs\datetime(mixed $timeUnit = null, mixed $timeZone = null): Phpolars\Expr
cs\decimal(): Phpolars\Expr
cs\duration(mixed $timeUnit = null): Phpolars\Expr
cs\empty_(): Phpolars\Expr
cs\ends_with(mixed ...$suffix): Phpolars\Expr
cs\enum_(): Phpolars\Expr
cs\exclude(mixed ...$columns): Phpolars\Expr
cs\first(): Phpolars\Expr
cs\float(): Phpolars\Expr
cs\integer(): Phpolars\Expr
cs\last(): Phpolars\Expr
cs\list_(?Phpolars\Expr $inner = null): Phpolars\Expr
cs\matches(string $pattern): Phpolars\Expr
cs\nested(): Phpolars\Expr
cs\numeric(): Phpolars\Expr
cs\signed_integer(): Phpolars\Expr
cs\starts_with(mixed ...$prefix): Phpolars\Expr
cs\string(): Phpolars\Expr
cs\struct_(): Phpolars\Expr
cs\temporal(): Phpolars\Expr
cs\time(): Phpolars\Expr
cs\unsigned_integer(): Phpolars\ExprFunctions
all(): Phpolars\Expr
all_horizontal(mixed ...$exprs): Phpolars\Expr
any(mixed $names, ?bool $ignoreNulls = null): Phpolars\Expr
any_horizontal(mixed ...$exprs): Phpolars\Expr
approx_n_unique(mixed ...$names): Phpolars\Expr
arange(mixed $start, mixed $end = null, ?int $step = null): Phpolars\Expr
arctan2(mixed $y, mixed $x): Phpolars\Expr
arg_sort_by(mixed $exprs, mixed $descending = null, mixed $nullsLast = null, ?bool $maintainOrder = null): Phpolars\Expr
arg_where(mixed $condition): Phpolars\Expr
business_day_count(mixed $start, mixed $end, ?array $weekMask = null, mixed $holidays = null): Phpolars\Expr
coalesce(mixed ...$exprs): Phpolars\Expr
col(mixed ...$names): Phpolars\Expr
collect_all(array $lazyFrames, ?string $engine = null): array
concat(array $items, ?string $how = null): mixed
concat_arr(mixed ...$exprs): Phpolars\Expr
concat_list(mixed ...$exprs): Phpolars\Expr
concat_str(mixed $exprs, ?string $separator = null, ?bool $ignoreNulls = null): Phpolars\Expr
corr(mixed $a, mixed $b, ?string $method = null, ?bool $propagateNans = null): Phpolars\Expr
count(mixed ...$names): Phpolars\Expr
cov(mixed $a, mixed $b, ?int $ddof = null): Phpolars\Expr
cum_count(mixed $names, ?bool $reverse = null): Phpolars\Expr
cum_sum(mixed $names, ?bool $reverse = null): Phpolars\Expr
cum_sum_horizontal(mixed ...$exprs): Phpolars\Expr
date(mixed $year, mixed $month, mixed $day): Phpolars\Expr
date_range(mixed $start = null, mixed $end = null, ?string $interval = null, ?int $numSamples = null, ?string $closed = null): Phpolars\Expr
date_ranges(mixed $start = null, mixed $end = null, ?string $interval = null, ?string $closed = null): Phpolars\Expr
datetime(mixed $year, mixed $month, mixed $day, mixed $hour = null, mixed $minute = null, mixed $second = null, mixed $microsecond = null, ?string $timeUnit = null, ?string $timeZone = null): Phpolars\Expr
datetime_range(mixed $start = null, mixed $end = null, ?string $interval = null, ?int $numSamples = null, ?string $closed = null, ?string $timeUnit = null, ?string $timeZone = null): Phpolars\Expr
datetime_ranges(mixed $start = null, mixed $end = null, ?string $interval = null, ?string $closed = null, ?string $timeUnit = null, ?string $timeZone = null): Phpolars\Expr
duration(mixed $weeks = null, mixed $days = null, mixed $hours = null, mixed $minutes = null, mixed $seconds = null, mixed $milliseconds = null, mixed $microseconds = null, mixed $nanoseconds = null, ?string $timeUnit = null): Phpolars\Expr
element(): Phpolars\Expr
escape_regex(string $s): string
exclude(mixed ...$names): Phpolars\Expr
field(mixed $name): Phpolars\Expr
first(mixed ...$names): Phpolars\Expr
format(string $fString, mixed ...$args): Phpolars\Expr
from_dict(array $data, ?array $schema = null): Phpolars\DataFrame
from_dicts(array $data, ?array $schema = null): Phpolars\DataFrame
from_epoch(mixed $column, ?string $timeUnit = null): Phpolars\Expr
from_records(array $data, ?array $schema = null): Phpolars\DataFrame
head(mixed $names, ?int $n = null): Phpolars\Expr
implode(mixed ...$names): Phpolars\Expr
int_range(mixed $start, mixed $end = null, ?int $step = null): Phpolars\Expr
int_ranges(mixed $start, mixed $end = null, mixed $step = null): Phpolars\Expr
json_normalize(array $data, ?string $separator = null, ?int $maxLevel = null): Phpolars\DataFrame
last(mixed ...$names): Phpolars\Expr
len(): Phpolars\Expr
linear_space(mixed $start, mixed $end, mixed $numSamples, ?string $closed = null): Phpolars\Expr
linear_spaces(mixed $start, mixed $end, mixed $numSamples, ?string $closed = null, ?bool $asArray = null): Phpolars\Expr
lit(mixed $value, ?string $dtype = null): Phpolars\Expr
max(mixed ...$names): Phpolars\Expr
max_horizontal(mixed ...$exprs): Phpolars\Expr
mean(mixed ...$names): Phpolars\Expr
mean_horizontal(mixed ...$exprs): Phpolars\Expr
median(mixed ...$names): Phpolars\Expr
min(mixed ...$names): Phpolars\Expr
min_horizontal(mixed ...$exprs): Phpolars\Expr
n_unique(mixed ...$names): Phpolars\Expr
nth(mixed ...$indices): Phpolars\Expr
ones(mixed $n, ?string $dtype = null): Phpolars\Expr
polars_version(): string
quantile(mixed $column, float $quantile, ?string $interpolation = null): Phpolars\Expr
repeat(mixed $value, mixed $n, ?string $dtype = null): Phpolars\Expr
rolling_corr(mixed $a, mixed $b, int $windowSize, ?int $minPeriods = null, ?int $ddof = null): Phpolars\Expr
rolling_cov(mixed $a, mixed $b, int $windowSize, ?int $minPeriods = null, ?int $ddof = null): Phpolars\Expr
row_index(?string $name = null): Phpolars\Expr
select(mixed ...$exprs): Phpolars\DataFrame
set_random_seed(int $seed): void
sql(string $query, ?array $dataFrames = null, ?bool $eager = null): mixed
sql_expr(string $sql): Phpolars\Expr
std(mixed $column, ?int $ddof = null): Phpolars\Expr
struct_(mixed ...$exprs): Phpolars\Expr
sum(mixed ...$names): Phpolars\Expr
sum_horizontal(mixed ...$exprs): Phpolars\Expr
tail(mixed $names, ?int $n = null): Phpolars\Expr
thread_pool_size(): int
time(mixed $hour = null, mixed $minute = null, mixed $second = null, mixed $microsecond = null): Phpolars\Expr
time_range(mixed $start = null, mixed $end = null, ?string $interval = null, ?string $closed = null): Phpolars\Expr
time_ranges(mixed $start = null, mixed $end = null, ?string $interval = null, ?string $closed = null): Phpolars\Expr
union(array $items, ?string $how = null): mixed
var_(mixed $column, ?int $ddof = null): Phpolars\Expr
version(): string
when(mixed ...$conditions): Phpolars\When
zeros(mixed $n, ?string $dtype = null): Phpolars\ExprMethods
Phpolars\Expr
__toString(): string
abs(): Phpolars\Expr
add(mixed $other): Phpolars\Expr
alias(string $name): Phpolars\Expr
all(?bool $ignoreNulls = null): Phpolars\Expr
and(mixed $other): Phpolars\Expr
any(?bool $ignoreNulls = null): Phpolars\Expr
append(mixed $other, ?bool $upcast = null): Phpolars\Expr
approxNUnique(): Phpolars\Expr
arccos(): Phpolars\Expr
arccosh(): Phpolars\Expr
arcsin(): Phpolars\Expr
arcsinh(): Phpolars\Expr
arctan(): Phpolars\Expr
arctanh(): Phpolars\Expr
argMax(): Phpolars\Expr
argMin(): Phpolars\Expr
argSort(?bool $descending = null, ?bool $nullsLast = null): Phpolars\Expr
argTrue(): Phpolars\Expr
argUnique(): Phpolars\Expr
arr(): Phpolars\ArrayNameSpace
backwardFill(?int $limit = null): Phpolars\Expr
bin(): Phpolars\BinaryNameSpace
bitwiseAnd(): Phpolars\Expr
bitwiseCountOnes(): Phpolars\Expr
bitwiseCountZeros(): Phpolars\Expr
bitwiseLeadingOnes(): Phpolars\Expr
bitwiseLeadingZeros(): Phpolars\Expr
bitwiseOr(): Phpolars\Expr
bitwiseTrailingOnes(): Phpolars\Expr
bitwiseTrailingZeros(): Phpolars\Expr
bitwiseXor(): Phpolars\Expr
bottomK(?int $k = null): Phpolars\Expr
bottomKBy(mixed $by, ?int $k = null, mixed $reverse = null): Phpolars\Expr
cast(string $dtype, ?bool $strict = null): Phpolars\Expr
cat(): Phpolars\CatNameSpace
cbrt(): Phpolars\Expr
ceil(): Phpolars\Expr
clip(mixed $lowerBound = null, mixed $upperBound = null): Phpolars\Expr
cos(): Phpolars\Expr
cosh(): Phpolars\Expr
cot(): Phpolars\Expr
count(): Phpolars\Expr
cumCount(?bool $reverse = null): Phpolars\Expr
cumMax(?bool $reverse = null): Phpolars\Expr
cumMin(?bool $reverse = null): Phpolars\Expr
cumProd(?bool $reverse = null): Phpolars\Expr
cumSum(?bool $reverse = null): Phpolars\Expr
cumulativeEval(mixed $expr, ?int $minPeriods = null): Phpolars\Expr
cut(mixed $breaks, ?array $labels = null, ?bool $leftClosed = null, ?bool $includeBreaks = null): Phpolars\Expr
degrees(): Phpolars\Expr
diff(?int $n = null, ?string $nullBehavior = null): Phpolars\Expr
div(mixed $other): Phpolars\Expr
dot(mixed $other): Phpolars\Expr
dropNans(): Phpolars\Expr
dropNulls(): Phpolars\Expr
dt(): Phpolars\DtNameSpace
entropy(?float $base = null, ?bool $normalize = null): Phpolars\Expr
eq(mixed $other): Phpolars\Expr
eqMissing(mixed $other): Phpolars\Expr
ewmMean(?float $com = null, ?float $span = null, ?float $halfLife = null, ?float $alpha = null, ?bool $adjust = null, ?int $minPeriods = null, ?bool $ignoreNulls = null): Phpolars\Expr
ewmMeanBy(mixed $by, string $halfLife): Phpolars\Expr
ewmStd(?float $com = null, ?float $span = null, ?float $halfLife = null, ?float $alpha = null, ?bool $adjust = null, ?bool $bias = null, ?int $minPeriods = null, ?bool $ignoreNulls = null): Phpolars\Expr
ewmSum(?float $com = null, ?float $span = null, ?float $halfLife = null, ?float $alpha = null, ?int $minPeriods = null, ?bool $ignoreNulls = null): Phpolars\Expr
ewmSumBy(mixed $by, string $halfLife): Phpolars\Expr
ewmVar(?float $com = null, ?float $span = null, ?float $halfLife = null, ?float $alpha = null, ?bool $adjust = null, ?bool $bias = null, ?int $minPeriods = null, ?bool $ignoreNulls = null): Phpolars\Expr
exclude(mixed ...$columns): Phpolars\Expr
exp(): Phpolars\Expr
explode(): Phpolars\Expr
extendConstant(mixed $value, mixed $n): Phpolars\Expr
fillNan(mixed $value): Phpolars\Expr
fillNull(mixed $value = null, ?string $strategy = null, ?int $limit = null): Phpolars\Expr
filter(mixed $predicate): Phpolars\Expr
first(?bool $ignoreNulls = null): Phpolars\Expr
flatten(): Phpolars\Expr
floor(): Phpolars\Expr
floordiv(mixed $other): Phpolars\Expr
forwardFill(?int $limit = null): Phpolars\Expr
gather(mixed $indices): Phpolars\Expr
gatherEvery(int $n, ?int $offset = null): Phpolars\Expr
ge(mixed $other): Phpolars\Expr
get(mixed $index, ?bool $nullOnOob = null): Phpolars\Expr
gt(mixed $other): Phpolars\Expr
hasNulls(): Phpolars\Expr
head(?int $n = null): Phpolars\Expr
hist(mixed $bins = null, ?int $binCount = null, ?bool $includeCategory = null, ?bool $includeBreakpoint = null): Phpolars\Expr
implode(): Phpolars\Expr
indexOf(mixed $element): Phpolars\Expr
interpolate(?string $method = null): Phpolars\Expr
interpolateBy(mixed $by): Phpolars\Expr
isBetween(mixed $lower, mixed $upper, ?string $closed = null): Phpolars\Expr
isClose(mixed $other, ?float $absTol = null, ?float $relTol = null, ?bool $nansEqual = null): Phpolars\Expr
isDuplicated(): Phpolars\Expr
isEmpty(?bool $ignoreNulls = null): Phpolars\Expr
isFinite(): Phpolars\Expr
isFirstDistinct(): Phpolars\Expr
isIn(mixed $other, ?bool $nullsEqual = null): Phpolars\Expr
isInfinite(): Phpolars\Expr
isLastDistinct(): Phpolars\Expr
isNan(): Phpolars\Expr
isNotNan(): Phpolars\Expr
isNotNull(): Phpolars\Expr
isNull(): Phpolars\Expr
isUnique(): Phpolars\Expr
item(?bool $allowEmpty = null): Phpolars\Expr
kurtosis(?bool $fisher = null, ?bool $bias = null): Phpolars\Expr
last(?bool $ignoreNulls = null): Phpolars\Expr
le(mixed $other): Phpolars\Expr
len(): Phpolars\Expr
limit(?int $n = null): Phpolars\Expr
list(): Phpolars\ListNameSpace
log(?float $base = null): Phpolars\Expr
log10(): Phpolars\Expr
log1P(): Phpolars\Expr
lowerBound(): Phpolars\Expr
lt(mixed $other): Phpolars\Expr
max(): Phpolars\Expr
maxBy(mixed $by): Phpolars\Expr
mean(): Phpolars\Expr
median(): Phpolars\Expr
meta(): Phpolars\MetaNameSpace
min(): Phpolars\Expr
minBy(mixed $by): Phpolars\Expr
mod(mixed $other): Phpolars\Expr
mode(): Phpolars\Expr
mul(mixed $other): Phpolars\Expr
nUnique(): Phpolars\Expr
name(): Phpolars\NameNameSpace
nanMax(): Phpolars\Expr
nanMin(): Phpolars\Expr
ne(mixed $other): Phpolars\Expr
neMissing(mixed $other): Phpolars\Expr
neg(): Phpolars\Expr
not(): Phpolars\Expr
nullCount(): Phpolars\Expr
or(mixed $other): Phpolars\Expr
over(mixed $partitionBy, mixed $orderBy = null, ?bool $descending = null, ?bool $nullsLast = null, ?string $mappingStrategy = null): Phpolars\Expr
pctChange(?int $n = null): Phpolars\Expr
peakMax(): Phpolars\Expr
peakMin(): Phpolars\Expr
pow(mixed $exponent): Phpolars\Expr
product(): Phpolars\Expr
qcut(mixed $quantiles, ?array $labels = null, ?bool $leftClosed = null, ?bool $allowDuplicates = null, ?bool $includeBreaks = null): Phpolars\Expr
quantile(mixed $quantile, ?string $interpolation = null): Phpolars\Expr
radians(): Phpolars\Expr
rank(?string $method = null, ?bool $descending = null, ?int $seed = null): Phpolars\Expr
reinterpret(?bool $signed = null): Phpolars\Expr
repeatBy(mixed $by): Phpolars\Expr
replace(mixed $old, mixed $new = null): Phpolars\Expr
replaceStrict(mixed $old, mixed $new = null, mixed $default = null, ?string $returnDtype = null): Phpolars\Expr
reshape(array $dimensions): Phpolars\Expr
reverse(): Phpolars\Expr
rle(): Phpolars\Expr
rleId(): Phpolars\Expr
rolling(mixed $indexColumn, string $period, ?string $offset = null, ?string $closed = null): Phpolars\Expr
rollingKurtosis(int $windowSize, ?bool $fisher = null, ?bool $bias = null, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingMax(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingMaxBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingMean(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingMeanBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingMedian(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingMedianBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingMin(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingMinBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingQuantile(float $quantile, int $windowSize, ?string $interpolation = null, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingQuantileBy(mixed $by, string $windowSize, float $quantile, ?string $interpolation = null, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingRank(int $windowSize, ?string $method = null, ?int $seed = null, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingRankBy(mixed $by, string $windowSize, ?string $method = null, ?int $seed = null, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingSkew(int $windowSize, ?bool $bias = null, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingStd(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingStdBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null, ?int $ddof = null): Phpolars\Expr
rollingSum(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingSumBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null): Phpolars\Expr
rollingVar(int $windowSize, ?int $minPeriods = null, ?bool $center = null): Phpolars\Expr
rollingVarBy(mixed $by, string $windowSize, ?int $minPeriods = null, ?string $closed = null, ?int $ddof = null): Phpolars\Expr
round(?int $decimals = null, ?string $mode = null): Phpolars\Expr
roundSigFigs(int $digits): Phpolars\Expr
sample(?int $n = null, ?float $fraction = null, ?bool $withReplacement = null, ?bool $shuffle = null, ?int $seed = null): Phpolars\Expr
searchSorted(mixed $element, ?string $side = null, ?bool $descending = null): Phpolars\Expr
shift(?int $n = null, mixed $fillValue = null): Phpolars\Expr
shuffle(?int $seed = null): Phpolars\Expr
sign(): Phpolars\Expr
sin(): Phpolars\Expr
sinh(): Phpolars\Expr
skew(?bool $bias = null): Phpolars\Expr
slice(int $offset, ?int $length = null): Phpolars\Expr
sort(?bool $descending = null, ?bool $nullsLast = null): Phpolars\Expr
sortBy(mixed $by, mixed $descending = null, mixed $nullsLast = null): Phpolars\Expr
sqrt(): Phpolars\Expr
std(?int $ddof = null): Phpolars\Expr
str(): Phpolars\StrNameSpace
struct(): Phpolars\StructNameSpace
sub(mixed $other): Phpolars\Expr
sum(): Phpolars\Expr
tail(?int $n = null): Phpolars\Expr
tan(): Phpolars\Expr
tanh(): Phpolars\Expr
toPhysical(): Phpolars\Expr
topK(?int $k = null): Phpolars\Expr
topKBy(mixed $by, ?int $k = null, mixed $reverse = null): Phpolars\Expr
truediv(mixed $other): Phpolars\Expr
unique(?bool $maintainOrder = null): Phpolars\Expr
uniqueCounts(): Phpolars\Expr
upperBound(): Phpolars\Expr
valueCounts(?bool $sort = null, ?string $name = null, ?bool $normalize = null): Phpolars\Expr
var(?int $ddof = null): Phpolars\Expr
xor(mixed $other): Phpolars\ExprPhpolars\When
then(mixed $value): Phpolars\ThenPhpolars\Then
alias(string $name): Phpolars\Expr
otherwise(mixed $value): Phpolars\Expr
when(mixed ...$condition): Phpolars\WhenPhpolars\StrNameSpace
contains(mixed $pattern, ?bool $literal = null, ?bool $strict = null): mixed
containsAny(mixed $patterns, ?bool $asciiCaseInsensitive = null): mixed
countMatches(mixed $pattern, ?bool $literal = null): mixed
decode(string $encoding, ?bool $strict = null): mixed
encode(string $encoding): mixed
endsWith(mixed $suffix): mixed
escapeRegex(): mixed
extract(mixed $pattern, ?int $groupIndex = null): mixed
extractAll(mixed $pattern): mixed
extractGroups(string $pattern): mixed
extractMany(mixed $patterns, ?bool $asciiCaseInsensitive = null, ?bool $overlapping = null, ?bool $leftmost = null): mixed
find(mixed $pattern, ?bool $literal = null, ?bool $strict = null): mixed
findMany(mixed $patterns, ?bool $asciiCaseInsensitive = null, ?bool $overlapping = null, ?bool $leftmost = null): mixed
head(int $n): mixed
join(?string $delimiter = null, ?bool $ignoreNulls = null): mixed
jsonDecode(string $dtype): mixed
jsonPathMatch(mixed $jsonPath): mixed
lenBytes(): mixed
lenChars(): mixed
normalize(?string $form = null): mixed
padEnd(mixed $length, ?string $fillChar = null): mixed
padStart(mixed $length, ?string $fillChar = null): mixed
replace(mixed $pattern, mixed $value, ?bool $literal = null, ?int $n = null): mixed
replaceAll(mixed $pattern, mixed $value, ?bool $literal = null): mixed
replaceMany(mixed $patterns, mixed $replaceWith = null, ?bool $asciiCaseInsensitive = null, ?bool $leftmost = null): mixed
reverse(): mixed
slice(mixed $offset, mixed $length = null): mixed
split(mixed $by, ?bool $inclusive = null, ?bool $literal = null): mixed
splitExact(mixed $by, int $n, ?bool $inclusive = null): mixed
splitn(mixed $by, int $n): mixed
startsWith(mixed $prefix): mixed
stripChars(?string $characters = null): mixed
stripCharsEnd(?string $characters = null): mixed
stripCharsStart(?string $characters = null): mixed
stripPrefix(mixed $prefix): mixed
stripSuffix(mixed $suffix): mixed
strptime(string $dtype, ?string $format = null, ?bool $strict = null, ?bool $exact = null): mixed
tail(int $n): mixed
toDate(?string $format = null, ?bool $strict = null, ?bool $exact = null): mixed
toDatetime(?string $format = null, ?string $timeUnit = null, ?string $timeZone = null, ?bool $strict = null, ?bool $exact = null): mixed
toDecimal(int $scale): mixed
toInteger(?int $base = null, ?string $dtype = null, ?bool $strict = null): mixed
toLowercase(): mixed
toTime(?string $format = null, ?bool $strict = null): mixed
toUppercase(): mixed
zfill(int $length): mixedPhpolars\DtNameSpace
addBusinessDays(mixed $n, ?array $weekMask = null, mixed $holidays = null, ?string $roll = null): mixed
baseUtcOffset(): mixed
castTimeUnit(string $timeUnit): mixed
century(): mixed
combine(mixed $time, ?string $timeUnit = null): mixed
convertTimeZone(string $timeZone): mixed
date(): mixed
datetime(): mixed
day(): mixed
daysInMonth(): mixed
dstOffset(): mixed
epoch(?string $timeUnit = null): mixed
hour(): mixed
isBusinessDay(?array $weekMask = null, mixed $holidays = null): mixed
isLeapYear(): mixed
isoYear(): mixed
microsecond(): mixed
millennium(): mixed
millisecond(): mixed
minute(): mixed
month(): mixed
monthEnd(): mixed
monthStart(): mixed
nanosecond(): mixed
offsetBy(string $by): mixed
ordinalDay(): mixed
quarter(): mixed
replace(mixed $year = null, mixed $month = null, mixed $day = null, mixed $hour = null, mixed $minute = null, mixed $second = null, mixed $microsecond = null, ?string $ambiguous = null): mixed
replaceTimeZone(?string $timeZone = null, ?string $ambiguous = null, ?string $nonExistent = null): mixed
round(string $every): mixed
second(): mixed
strftime(string $format): mixed
time(): mixed
timestamp(?string $timeUnit = null): mixed
toString(?string $format = null): mixed
totalDays(?bool $fractional = null): mixed
totalHours(?bool $fractional = null): mixed
totalMicroseconds(?bool $fractional = null): mixed
totalMilliseconds(?bool $fractional = null): mixed
totalMinutes(?bool $fractional = null): mixed
totalNanoseconds(?bool $fractional = null): mixed
totalSeconds(?bool $fractional = null): mixed
truncate(string $every): mixed
week(): mixed
weekday(): mixed
withTimeUnit(string $timeUnit): mixed
year(): mixedPhpolars\ListNameSpace
agg(mixed $expr): mixed
all(?bool $ignoreNulls = null): mixed
any(?bool $ignoreNulls = null): mixed
argMax(): mixed
argMin(): mixed
concat(mixed $other): mixed
contains(mixed $item, ?bool $nullsEqual = null): mixed
countMatches(mixed $element): mixed
diff(?int $n = null): mixed
dropNulls(): mixed
eval(mixed $expr): mixed
explode(): mixed
filter(mixed $predicate): mixed
first(): mixed
gather(mixed $indices, ?bool $nullOnOob = null): mixed
gatherEvery(mixed $n, mixed $offset = null): mixed
get(mixed $index, ?bool $nullOnOob = null): mixed
head(?int $n = null): mixed
item(?bool $allowEmpty = null): mixed
join(mixed $separator, ?bool $ignoreNulls = null): mixed
last(): mixed
len(): mixed
max(): mixed
mean(): mixed
median(): mixed
min(): mixed
nUnique(): mixed
reverse(): mixed
sample(mixed $n = null, mixed $fraction = null, ?bool $withReplacement = null, ?bool $shuffle = null, ?int $seed = null): mixed
setDifference(mixed $other): mixed
setIntersection(mixed $other): mixed
setSymmetricDifference(mixed $other): mixed
setUnion(mixed $other): mixed
shift(?int $n = null): mixed
slice(int $offset, ?int $length = null): mixed
sort(?bool $descending = null, ?bool $nullsLast = null): mixed
std(?int $ddof = null): mixed
sum(): mixed
tail(?int $n = null): mixed
toArray(int $width): mixed
toStruct(mixed $fields = null): mixed
unique(?bool $maintainOrder = null): mixed
var(?int $ddof = null): mixedPhpolars\StructNameSpace
field(string $name): mixed
jsonEncode(): mixed
renameFields(mixed $names): mixed
unnest(): mixed
withFields(mixed ...$exprs): mixedPhpolars\NameNameSpace
keep(): Phpolars\Expr
prefix(string $prefix): Phpolars\Expr
prefixFields(string $prefix): Phpolars\Expr
replace(string $pattern, string $value, ?bool $literal = null): Phpolars\Expr
suffix(string $suffix): Phpolars\Expr
suffixFields(string $suffix): Phpolars\Expr
toLowercase(): Phpolars\Expr
toUppercase(): Phpolars\ExprPhpolars\CatNameSpace
endsWith(string $suffix): mixed
getCategories(): mixed
lenBytes(): mixed
lenChars(): mixed
slice(int $offset, ?int $length = null): mixed
startsWith(string $prefix): mixedPhpolars\ArrayNameSpace
agg(mixed $expr): mixed
all(?bool $ignoreNulls = null): mixed
any(?bool $ignoreNulls = null): mixed
argMax(): mixed
argMin(): mixed
contains(mixed $item, ?bool $nullsEqual = null): mixed
countMatches(mixed $element): mixed
eval(mixed $expr, ?bool $asList = null): mixed
explode(): mixed
first(): mixed
get(mixed $index, ?bool $nullOnOob = null): mixed
head(?int $n = null, ?bool $asArray = null): mixed
join(mixed $separator, ?bool $ignoreNulls = null): mixed
last(): mixed
len(): mixed
max(): mixed
mean(): mixed
median(): mixed
min(): mixed
nUnique(): mixed
reverse(): mixed
shift(mixed $n = null): mixed
slice(mixed $offset, mixed $length = null, ?bool $asArray = null): mixed
sort(?bool $descending = null, ?bool $nullsLast = null): mixed
std(?int $ddof = null): mixed
sum(): mixed
tail(?int $n = null, ?bool $asArray = null): mixed
toList(): mixed
toStruct(): mixed
unique(?bool $maintainOrder = null): mixed
var(?int $ddof = null): mixedPhpolars\BinaryNameSpace
contains(mixed $literal): mixed
decode(string $encoding, ?bool $strict = null): mixed
encode(string $encoding): mixed
endsWith(mixed $suffix): mixed
get(mixed $index, ?bool $nullOnOob = null): mixed
head(?int $n = null): mixed
reinterpret(string $dtype, ?string $endianness = null): mixed
size(?string $unit = null): mixed
slice(mixed $offset, mixed $length = null): mixed
startsWith(mixed $prefix): mixed
tail(?int $n = null): mixed