Flowfile 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Flowfile might be problematic. Click here for more details.
- flowfile/__init__.py +2 -1
- flowfile/web/__init__.py +3 -0
- {flowfile-0.3.2.dist-info → flowfile-0.3.3.dist-info}/METADATA +1 -1
- {flowfile-0.3.2.dist-info → flowfile-0.3.3.dist-info}/RECORD +46 -35
- flowfile_core/configs/__init__.py +15 -4
- flowfile_core/configs/settings.py +5 -3
- flowfile_core/configs/utils.py +18 -0
- flowfile_core/flowfile/FlowfileFlow.py +13 -18
- flowfile_core/flowfile/database_connection_manager/db_connections.py +1 -1
- flowfile_core/flowfile/flow_data_engine/flow_data_engine.py +54 -17
- flowfile_core/flowfile/flow_data_engine/flow_file_column/main.py +42 -9
- flowfile_core/flowfile/flow_data_engine/flow_file_column/utils.py +42 -3
- flowfile_core/flowfile/flow_data_engine/polars_code_parser.py +2 -1
- flowfile_core/flowfile/flow_data_engine/sample_data.py +25 -7
- flowfile_core/flowfile/flow_data_engine/subprocess_operations/subprocess_operations.py +4 -3
- flowfile_core/flowfile/flow_data_engine/utils.py +1 -0
- flowfile_core/flowfile/flow_node/flow_node.py +2 -1
- flowfile_core/flowfile/sources/external_sources/airbyte_sources/models.py +2 -2
- flowfile_core/flowfile/sources/external_sources/sql_source/sql_source.py +1 -1
- flowfile_core/flowfile/utils.py +34 -3
- flowfile_core/main.py +2 -3
- flowfile_core/routes/secrets.py +1 -1
- flowfile_core/schemas/input_schema.py +10 -4
- flowfile_core/schemas/transform_schema.py +25 -47
- flowfile_frame/__init__.py +11 -4
- flowfile_frame/adding_expr.py +280 -0
- flowfile_frame/config.py +9 -0
- flowfile_frame/expr.py +301 -83
- flowfile_frame/expr.pyi +2174 -0
- flowfile_frame/expr_name.py +258 -0
- flowfile_frame/flow_frame.py +587 -1002
- flowfile_frame/flow_frame.pyi +336 -0
- flowfile_frame/flow_frame_methods.py +617 -0
- flowfile_frame/group_frame.py +89 -42
- flowfile_frame/join.py +1 -2
- flowfile_frame/lazy.py +704 -0
- flowfile_frame/lazy_methods.py +201 -0
- flowfile_frame/list_name_space.py +324 -0
- flowfile_frame/selectors.py +3 -0
- flowfile_frame/series.py +70 -0
- flowfile_frame/utils.py +80 -4
- {flowfile-0.3.2.dist-info → flowfile-0.3.3.dist-info}/LICENSE +0 -0
- {flowfile-0.3.2.dist-info → flowfile-0.3.3.dist-info}/WHEEL +0 -0
- {flowfile-0.3.2.dist-info → flowfile-0.3.3.dist-info}/entry_points.txt +0 -0
- /flowfile_core/{secrets → secret_manager}/__init__.py +0 -0
- /flowfile_core/{secrets/secrets.py → secret_manager/secret_manager.py} +0 -0
flowfile_frame/expr.pyi
ADDED
|
@@ -0,0 +1,2174 @@
|
|
|
1
|
+
# This file was auto-generated to provide type information for Expr
|
|
2
|
+
# DO NOT MODIFY THIS FILE MANUALLY
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, List, Optional, Union, TypeVar, TYPE_CHECKING
|
|
6
|
+
import polars as pl
|
|
7
|
+
from polars.expr.expr import Expr as PolarsExpr
|
|
8
|
+
from polars.expr.string import ExprStringNameSpace
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from collections.abc import Iterable
|
|
12
|
+
from io import IOBase
|
|
13
|
+
from polars import DataFrame, LazyFrame, Series
|
|
14
|
+
from polars._typing import *
|
|
15
|
+
|
|
16
|
+
if sys.version_info >= (3, 11):
|
|
17
|
+
from typing import Concatenate, ParamSpec
|
|
18
|
+
else:
|
|
19
|
+
from typing_extensions import Concatenate, ParamSpec
|
|
20
|
+
T = TypeVar('T')
|
|
21
|
+
P = ParamSpec('P')
|
|
22
|
+
from flowfile_core.schemas import transform_schema
|
|
23
|
+
import flowfile_frame
|
|
24
|
+
from flowfile_frame.selectors import Selector
|
|
25
|
+
from flowfile_frame.expr_name import ExprNameNameSpace
|
|
26
|
+
|
|
27
|
+
# Define NoneType to handle type hints with None
|
|
28
|
+
NoneType = type(None)
|
|
29
|
+
|
|
30
|
+
ExprOrStr = Union['Expr', str]
|
|
31
|
+
ExprOrStrList = List[ExprOrStr]
|
|
32
|
+
ExprStrOrList = Union[ExprOrStr, ExprOrStrList]
|
|
33
|
+
|
|
34
|
+
class StringMethods:
|
|
35
|
+
__module__: Any
|
|
36
|
+
__annotations__: Any
|
|
37
|
+
__dict__: Any
|
|
38
|
+
__weakref__: Any
|
|
39
|
+
__doc__: Any
|
|
40
|
+
|
|
41
|
+
def __getattr__(self, name) -> Any: ...
|
|
42
|
+
|
|
43
|
+
def __init__(self, parent_expr: 'Expr', parent_repr_str: str, convertable_to_code: bool=True, _function_sources: Optional[List[str]]=None) -> Any: ...
|
|
44
|
+
|
|
45
|
+
def _create_next_expr(self, *args, method_name: str, result_expr: Optional[pl.Expr], is_complex: bool, convertable_to_code: bool=None, **kwargs) -> 'Expr': ...
|
|
46
|
+
|
|
47
|
+
def contains(self, pattern, literal=False) -> Any: ...
|
|
48
|
+
|
|
49
|
+
def ends_with(self, suffix) -> Any: ...
|
|
50
|
+
|
|
51
|
+
def len_bytes(self, ) -> Any: ...
|
|
52
|
+
|
|
53
|
+
def len_chars(self, ) -> Any: ...
|
|
54
|
+
|
|
55
|
+
def replace(self, pattern, replacement, literal=False) -> Any: ...
|
|
56
|
+
|
|
57
|
+
def starts_with(self, prefix) -> Any: ...
|
|
58
|
+
|
|
59
|
+
def to_lowercase(self, ) -> Any: ...
|
|
60
|
+
|
|
61
|
+
def to_titlecase(self, ) -> Any: ...
|
|
62
|
+
|
|
63
|
+
def to_uppercase(self, ) -> Any: ...
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class DateTimeMethods:
|
|
67
|
+
__module__: Any
|
|
68
|
+
__annotations__: Any
|
|
69
|
+
__dict__: Any
|
|
70
|
+
__weakref__: Any
|
|
71
|
+
__doc__: Any
|
|
72
|
+
|
|
73
|
+
def __getattr__(self, name) -> Any: ...
|
|
74
|
+
|
|
75
|
+
def __init__(self, parent_expr: 'Expr', parent_repr_str: str, convertable_to_code: bool=True, _function_sources: Optional[List[str]]=None) -> Any: ...
|
|
76
|
+
|
|
77
|
+
def _create_next_expr(self, method_name: str, result_expr: Optional[pl.Expr], convertable_to_code: bool=None, *args, **kwargs) -> 'Expr': ...
|
|
78
|
+
|
|
79
|
+
def day(self, ) -> Any: ...
|
|
80
|
+
|
|
81
|
+
def hour(self, ) -> Any: ...
|
|
82
|
+
|
|
83
|
+
def minute(self, ) -> Any: ...
|
|
84
|
+
|
|
85
|
+
def month(self, ) -> Any: ...
|
|
86
|
+
|
|
87
|
+
def second(self, ) -> Any: ...
|
|
88
|
+
|
|
89
|
+
def year(self, ) -> Any: ...
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class Expr:
|
|
93
|
+
dt: DateTimeMethods
|
|
94
|
+
is_simple: bool
|
|
95
|
+
list: ExprListNameSpace
|
|
96
|
+
name: ExprNameNameSpace
|
|
97
|
+
str: StringMethods
|
|
98
|
+
__module__: Any
|
|
99
|
+
__annotations__: Any
|
|
100
|
+
is_complex: bool
|
|
101
|
+
__dict__: Any
|
|
102
|
+
__weakref__: Any
|
|
103
|
+
__doc__: Any
|
|
104
|
+
__hash__: Any
|
|
105
|
+
|
|
106
|
+
def __add__(self, other) -> 'Expr': ...
|
|
107
|
+
|
|
108
|
+
def __and__(self, other) -> 'Expr': ...
|
|
109
|
+
|
|
110
|
+
def __eq__(self, other) -> 'Expr': ...
|
|
111
|
+
|
|
112
|
+
def __floordiv__(self, other) -> 'Expr': ...
|
|
113
|
+
|
|
114
|
+
def __ge__(self, other) -> 'Expr': ...
|
|
115
|
+
|
|
116
|
+
def __gt__(self, other) -> 'Expr': ...
|
|
117
|
+
|
|
118
|
+
def __init__(self, expr: Optional[pl.Expr], column_name: Optional[str]=None, repr_str: Optional[str]=None, initial_column_name: Optional[str]=None, selector: Optional['Selector']=None, agg_func: Optional[str]=None, ddof: Optional[int]=None, is_complex: bool=False, convertable_to_code: bool=True, _function_sources: Optional[List[str]]=None) -> Any: ...
|
|
119
|
+
|
|
120
|
+
def __invert__(self, ) -> 'Expr': ...
|
|
121
|
+
|
|
122
|
+
def __le__(self, other) -> 'Expr': ...
|
|
123
|
+
|
|
124
|
+
def __lt__(self, other) -> 'Expr': ...
|
|
125
|
+
|
|
126
|
+
def __mod__(self, other) -> 'Expr': ...
|
|
127
|
+
|
|
128
|
+
def __mul__(self, other) -> 'Expr': ...
|
|
129
|
+
|
|
130
|
+
def __ne__(self, other) -> 'Expr': ...
|
|
131
|
+
|
|
132
|
+
def __neg__(self, ) -> 'Expr': ...
|
|
133
|
+
|
|
134
|
+
def __or__(self, other) -> 'Expr': ...
|
|
135
|
+
|
|
136
|
+
def __pow__(self, exponent) -> 'Expr': ...
|
|
137
|
+
|
|
138
|
+
def __radd__(self, other) -> Any: ...
|
|
139
|
+
|
|
140
|
+
def __repr__(self, ) -> str: ...
|
|
141
|
+
|
|
142
|
+
def __rfloordiv__(self, other) -> Any: ...
|
|
143
|
+
|
|
144
|
+
def __rmod__(self, other) -> Any: ...
|
|
145
|
+
|
|
146
|
+
def __rmul__(self, other) -> Any: ...
|
|
147
|
+
|
|
148
|
+
def __rpow__(self, other) -> Any: ...
|
|
149
|
+
|
|
150
|
+
def __rsub__(self, other) -> Any: ...
|
|
151
|
+
|
|
152
|
+
def __rtruediv__(self, other) -> Any: ...
|
|
153
|
+
|
|
154
|
+
def __sub__(self, other) -> 'Expr': ...
|
|
155
|
+
|
|
156
|
+
def __truediv__(self, other) -> 'Expr': ...
|
|
157
|
+
|
|
158
|
+
# Creates a new Expr for binary operations.
|
|
159
|
+
def _create_binary_op_expr(self, op_symbol: str, other: Any, result_expr: Optional[pl.Expr]) -> 'Expr': ...
|
|
160
|
+
|
|
161
|
+
# Creates a new Expr instance, appending method call to repr string.
|
|
162
|
+
def _create_next_expr(self, *args, method_name: str, result_expr: Optional[pl.Expr], convertable_to_code: bool=None, is_complex: bool, _function_sources: Optional[List[str]]=None, **kwargs) -> 'Expr': ...
|
|
163
|
+
|
|
164
|
+
# Helper to get appropriate string representation for an expression
|
|
165
|
+
def _get_expr_repr(self, expr) -> Any: ...
|
|
166
|
+
|
|
167
|
+
# Compute absolute values.
|
|
168
|
+
def abs(self, ) -> Expr: ...
|
|
169
|
+
|
|
170
|
+
# Method equivalent of addition operator `expr + other`.
|
|
171
|
+
def add(self, other: Any) -> Expr: ...
|
|
172
|
+
|
|
173
|
+
# Get the group indexes of the group by operation.
|
|
174
|
+
def agg_groups(self, ) -> Expr: ...
|
|
175
|
+
|
|
176
|
+
# Rename the expression result.
|
|
177
|
+
def alias(self, name) -> 'Expr': ...
|
|
178
|
+
|
|
179
|
+
# Return whether all values in the column are `True`.
|
|
180
|
+
def all(self, ignore_nulls: bool=True) -> Expr: ...
|
|
181
|
+
|
|
182
|
+
# Method equivalent of bitwise "and" operator `expr & other & ...`.
|
|
183
|
+
def and_(self, *others) -> Expr: ...
|
|
184
|
+
|
|
185
|
+
# Return whether any of the values in the column are `True`.
|
|
186
|
+
def any(self, ignore_nulls: bool=True) -> Expr: ...
|
|
187
|
+
|
|
188
|
+
# Append expressions.
|
|
189
|
+
def append(self, other: IntoExpr, upcast: bool=True) -> Expr: ...
|
|
190
|
+
|
|
191
|
+
# Approximate count of unique values.
|
|
192
|
+
def approx_n_unique(self, ) -> Expr: ...
|
|
193
|
+
|
|
194
|
+
# Compute the element-wise value for the inverse cosine.
|
|
195
|
+
def arccos(self, ) -> Expr: ...
|
|
196
|
+
|
|
197
|
+
# Compute the element-wise value for the inverse hyperbolic cosine.
|
|
198
|
+
def arccosh(self, ) -> Expr: ...
|
|
199
|
+
|
|
200
|
+
# Compute the element-wise value for the inverse sine.
|
|
201
|
+
def arcsin(self, ) -> Expr: ...
|
|
202
|
+
|
|
203
|
+
# Compute the element-wise value for the inverse hyperbolic sine.
|
|
204
|
+
def arcsinh(self, ) -> Expr: ...
|
|
205
|
+
|
|
206
|
+
# Compute the element-wise value for the inverse tangent.
|
|
207
|
+
def arctan(self, ) -> Expr: ...
|
|
208
|
+
|
|
209
|
+
# Compute the element-wise value for the inverse hyperbolic tangent.
|
|
210
|
+
def arctanh(self, ) -> Expr: ...
|
|
211
|
+
|
|
212
|
+
# Get the index of the maximal value.
|
|
213
|
+
def arg_max(self, ) -> Expr: ...
|
|
214
|
+
|
|
215
|
+
# Get the index of the minimal value.
|
|
216
|
+
def arg_min(self, ) -> Expr: ...
|
|
217
|
+
|
|
218
|
+
def arg_sort(self, descending: bool=False, nulls_last: bool=False) -> 'Expr': ...
|
|
219
|
+
|
|
220
|
+
# Return indices where expression evaluates `True`.
|
|
221
|
+
def arg_true(self, ) -> Expr: ...
|
|
222
|
+
|
|
223
|
+
def arg_unique(self, ) -> 'Expr': ...
|
|
224
|
+
|
|
225
|
+
# Fill missing values with the next non-null value.
|
|
226
|
+
def backward_fill(self, limit: int | None=None) -> Expr: ...
|
|
227
|
+
|
|
228
|
+
# Perform an aggregation of bitwise ANDs.
|
|
229
|
+
def bitwise_and(self, ) -> Expr: ...
|
|
230
|
+
|
|
231
|
+
# Evaluate the number of set bits.
|
|
232
|
+
def bitwise_count_ones(self, ) -> Expr: ...
|
|
233
|
+
|
|
234
|
+
# Evaluate the number of unset bits.
|
|
235
|
+
def bitwise_count_zeros(self, ) -> Expr: ...
|
|
236
|
+
|
|
237
|
+
# Evaluate the number most-significant set bits before seeing an unset bit.
|
|
238
|
+
def bitwise_leading_ones(self, ) -> Expr: ...
|
|
239
|
+
|
|
240
|
+
# Evaluate the number most-significant unset bits before seeing a set bit.
|
|
241
|
+
def bitwise_leading_zeros(self, ) -> Expr: ...
|
|
242
|
+
|
|
243
|
+
# Perform an aggregation of bitwise ORs.
|
|
244
|
+
def bitwise_or(self, ) -> Expr: ...
|
|
245
|
+
|
|
246
|
+
# Evaluate the number least-significant set bits before seeing an unset bit.
|
|
247
|
+
def bitwise_trailing_ones(self, ) -> Expr: ...
|
|
248
|
+
|
|
249
|
+
# Evaluate the number least-significant unset bits before seeing a set bit.
|
|
250
|
+
def bitwise_trailing_zeros(self, ) -> Expr: ...
|
|
251
|
+
|
|
252
|
+
# Perform an aggregation of bitwise XORs.
|
|
253
|
+
def bitwise_xor(self, ) -> Expr: ...
|
|
254
|
+
|
|
255
|
+
# Return the `k` smallest elements.
|
|
256
|
+
def bottom_k(self, k: int | IntoExprColumn=5) -> Expr: ...
|
|
257
|
+
|
|
258
|
+
# Return the elements corresponding to the `k` smallest elements of the `by` column(s).
|
|
259
|
+
def bottom_k_by(self, by: IntoExpr | Iterable[IntoExpr], k: int | IntoExprColumn=5, reverse: bool | Sequence[bool]=False) -> Expr: ...
|
|
260
|
+
|
|
261
|
+
# Casts the Expr to a specified data type.
|
|
262
|
+
def cast(self, dtype: Union[pl.DataType, str, pl.datatypes.classes.DataTypeClass], strict=True) -> 'Expr': ...
|
|
263
|
+
|
|
264
|
+
# Compute the cube root of the elements.
|
|
265
|
+
def cbrt(self, ) -> Expr: ...
|
|
266
|
+
|
|
267
|
+
# Rounds up to the nearest integer value.
|
|
268
|
+
def ceil(self, ) -> Expr: ...
|
|
269
|
+
|
|
270
|
+
# Set values outside the given boundaries to the boundary value.
|
|
271
|
+
def clip(self, lower_bound: NumericLiteral | TemporalLiteral | IntoExprColumn | None=None, upper_bound: NumericLiteral | TemporalLiteral | IntoExprColumn | None=None) -> Expr: ...
|
|
272
|
+
|
|
273
|
+
# Compute the element-wise value for the cosine.
|
|
274
|
+
def cos(self, ) -> Expr: ...
|
|
275
|
+
|
|
276
|
+
# Compute the element-wise value for the hyperbolic cosine.
|
|
277
|
+
def cosh(self, ) -> Expr: ...
|
|
278
|
+
|
|
279
|
+
# Compute the element-wise value for the cotangent.
|
|
280
|
+
def cot(self, ) -> Expr: ...
|
|
281
|
+
|
|
282
|
+
def count(self, ) -> 'Expr': ...
|
|
283
|
+
|
|
284
|
+
# Return the cumulative count of the non-null values in the column.
|
|
285
|
+
def cum_count(self, reverse: bool=False) -> 'Expr': ...
|
|
286
|
+
|
|
287
|
+
# Get an array with the cumulative max computed at every element.
|
|
288
|
+
def cum_max(self, reverse: bool=False) -> Expr: ...
|
|
289
|
+
|
|
290
|
+
# Get an array with the cumulative min computed at every element.
|
|
291
|
+
def cum_min(self, reverse: bool=False) -> Expr: ...
|
|
292
|
+
|
|
293
|
+
# Get an array with the cumulative product computed at every element.
|
|
294
|
+
def cum_prod(self, reverse: bool=False) -> Expr: ...
|
|
295
|
+
|
|
296
|
+
# Get an array with the cumulative sum computed at every element.
|
|
297
|
+
def cum_sum(self, reverse: bool=False) -> Expr: ...
|
|
298
|
+
|
|
299
|
+
# Run an expression over a sliding window that increases `1` slot every iteration.
|
|
300
|
+
def cumulative_eval(self, expr: Expr, min_samples: int=1, parallel: bool=False) -> Expr: ...
|
|
301
|
+
|
|
302
|
+
# Bin continuous values into discrete categories.
|
|
303
|
+
def cut(self, breaks: Sequence[float], labels: Sequence[str] | None=None, left_closed: bool=False, include_breaks: bool=False) -> Expr: ...
|
|
304
|
+
|
|
305
|
+
# Convert from radians to degrees.
|
|
306
|
+
def degrees(self, ) -> Expr: ...
|
|
307
|
+
|
|
308
|
+
# Read a serialized expression from a file.
|
|
309
|
+
def deserialize(self, source: str | Path | IOBase | bytes, format: SerializationFormat='binary') -> Expr: ...
|
|
310
|
+
|
|
311
|
+
# Calculate the first discrete difference between shifted items.
|
|
312
|
+
def diff(self, n: int=1, null_behavior: NullBehavior='ignore') -> Expr: ...
|
|
313
|
+
|
|
314
|
+
# Compute the dot/inner product between two Expressions.
|
|
315
|
+
def dot(self, other: Expr | str) -> Expr: ...
|
|
316
|
+
|
|
317
|
+
# Drop all floating point NaN values.
|
|
318
|
+
def drop_nans(self, ) -> Expr: ...
|
|
319
|
+
|
|
320
|
+
# Drop all null values.
|
|
321
|
+
def drop_nulls(self, ) -> Expr: ...
|
|
322
|
+
|
|
323
|
+
# Computes the entropy.
|
|
324
|
+
def entropy(self, base: float=2.718281828459045, normalize: bool=True) -> Expr: ...
|
|
325
|
+
|
|
326
|
+
# Method equivalent of equality operator `expr == other`.
|
|
327
|
+
def eq(self, other: Any) -> Expr: ...
|
|
328
|
+
|
|
329
|
+
# Method equivalent of equality operator `expr == other` where `None == None`.
|
|
330
|
+
def eq_missing(self, other: Any) -> Expr: ...
|
|
331
|
+
|
|
332
|
+
# Compute exponentially-weighted moving average.
|
|
333
|
+
def ewm_mean(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
334
|
+
|
|
335
|
+
# Compute time-based exponentially weighted moving average.
|
|
336
|
+
def ewm_mean_by(self, by: str | IntoExpr, half_life: str | timedelta) -> Expr: ...
|
|
337
|
+
|
|
338
|
+
# Compute exponentially-weighted moving standard deviation.
|
|
339
|
+
def ewm_std(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, bias: bool=False, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
340
|
+
|
|
341
|
+
# Compute exponentially-weighted moving variance.
|
|
342
|
+
def ewm_var(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, bias: bool=False, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
343
|
+
|
|
344
|
+
# Exclude columns from a multi-column expression.
|
|
345
|
+
def exclude(self, columns: str | PolarsDataType | Collection[str] | Collection[PolarsDataType], *more_columns) -> Expr: ...
|
|
346
|
+
|
|
347
|
+
# Compute the exponential, element-wise.
|
|
348
|
+
def exp(self, ) -> Expr: ...
|
|
349
|
+
|
|
350
|
+
def explode(self, ) -> Any: ...
|
|
351
|
+
|
|
352
|
+
# Extremely fast method for extending the Series with 'n' copies of a value.
|
|
353
|
+
def extend_constant(self, value: IntoExpr, n: int | IntoExprColumn) -> Expr: ...
|
|
354
|
+
|
|
355
|
+
def fill_nan(self, value) -> 'Expr': ...
|
|
356
|
+
|
|
357
|
+
def fill_null(self, value) -> 'Expr': ...
|
|
358
|
+
|
|
359
|
+
# Filter expression
|
|
360
|
+
def filter(self, *predicates, **constraints) -> 'Expr': ...
|
|
361
|
+
|
|
362
|
+
def first(self, ) -> 'Expr': ...
|
|
363
|
+
|
|
364
|
+
# Flatten a list or string column.
|
|
365
|
+
def flatten(self, ) -> Expr: ...
|
|
366
|
+
|
|
367
|
+
# Rounds down to the nearest integer value.
|
|
368
|
+
def floor(self, ) -> Expr: ...
|
|
369
|
+
|
|
370
|
+
# Method equivalent of integer division operator `expr // other`.
|
|
371
|
+
def floordiv(self, other: Any) -> Expr: ...
|
|
372
|
+
|
|
373
|
+
# Fill missing values with the last non-null value.
|
|
374
|
+
def forward_fill(self, limit: int | None=None) -> Expr: ...
|
|
375
|
+
|
|
376
|
+
# Read an expression from a JSON encoded string to construct an Expression.
|
|
377
|
+
def from_json(self, value: str) -> Expr: ...
|
|
378
|
+
|
|
379
|
+
# Take values by index.
|
|
380
|
+
def gather(self, indices: int | Sequence[int] | IntoExpr | Series | np.ndarray[Any, Any]) -> Expr: ...
|
|
381
|
+
|
|
382
|
+
# Take every nth value in the Series and return as a new Series.
|
|
383
|
+
def gather_every(self, n: int, offset: int=0) -> Expr: ...
|
|
384
|
+
|
|
385
|
+
# Method equivalent of "greater than or equal" operator `expr >= other`.
|
|
386
|
+
def ge(self, other: Any) -> Expr: ...
|
|
387
|
+
|
|
388
|
+
# Return a single value by index.
|
|
389
|
+
def get(self, index: int | Expr) -> Expr: ...
|
|
390
|
+
|
|
391
|
+
# Get the Polars code representation of this expression, including any function definitions.
|
|
392
|
+
def get_polars_code(self, ) -> str: ...
|
|
393
|
+
|
|
394
|
+
# Method equivalent of "greater than" operator `expr > other`.
|
|
395
|
+
def gt(self, other: Any) -> Expr: ...
|
|
396
|
+
|
|
397
|
+
# Check whether the expression contains one or more null values.
|
|
398
|
+
def has_nulls(self, ) -> Expr: ...
|
|
399
|
+
|
|
400
|
+
# Hash the elements in the selection.
|
|
401
|
+
def hash(self, seed: int=0, seed_1: int | None=None, seed_2: int | None=None, seed_3: int | None=None) -> Expr: ...
|
|
402
|
+
|
|
403
|
+
# Get the first `n` rows.
|
|
404
|
+
def head(self, n: int | Expr=10) -> Expr: ...
|
|
405
|
+
|
|
406
|
+
# Bin values into buckets and count their occurrences.
|
|
407
|
+
def hist(self, bins: IntoExpr | None=None, bin_count: int | None=None, include_category: bool=False, include_breakpoint: bool=False) -> Expr: ...
|
|
408
|
+
|
|
409
|
+
def implode(self, ) -> Any: ...
|
|
410
|
+
|
|
411
|
+
# Get the index of the first occurrence of a value, or ``None`` if it's not found.
|
|
412
|
+
def index_of(self, element: IntoExpr) -> Expr: ...
|
|
413
|
+
|
|
414
|
+
# Print the value that this expression evaluates to and pass on the value.
|
|
415
|
+
def inspect(self, fmt: str='{}') -> Expr: ...
|
|
416
|
+
|
|
417
|
+
# Fill null values using interpolation.
|
|
418
|
+
def interpolate(self, method: InterpolationMethod='linear') -> Expr: ...
|
|
419
|
+
|
|
420
|
+
# Fill null values using interpolation based on another column.
|
|
421
|
+
def interpolate_by(self, by: IntoExpr) -> Expr: ...
|
|
422
|
+
|
|
423
|
+
# Check if this expression is between the given lower and upper bounds.
|
|
424
|
+
def is_between(self, lower_bound: IntoExpr, upper_bound: IntoExpr, closed: ClosedInterval='both') -> Expr: ...
|
|
425
|
+
|
|
426
|
+
# Return a boolean mask indicating duplicated values.
|
|
427
|
+
def is_duplicated(self, ) -> Expr: ...
|
|
428
|
+
|
|
429
|
+
# Returns a boolean Series indicating which values are finite.
|
|
430
|
+
def is_finite(self, ) -> Expr: ...
|
|
431
|
+
|
|
432
|
+
# Return a boolean mask indicating the first occurrence of each distinct value.
|
|
433
|
+
def is_first_distinct(self, ) -> Expr: ...
|
|
434
|
+
|
|
435
|
+
def is_in(self, values) -> Any: ...
|
|
436
|
+
|
|
437
|
+
# Returns a boolean Series indicating which values are infinite.
|
|
438
|
+
def is_infinite(self, ) -> Expr: ...
|
|
439
|
+
|
|
440
|
+
# Return a boolean mask indicating the last occurrence of each distinct value.
|
|
441
|
+
def is_last_distinct(self, ) -> Expr: ...
|
|
442
|
+
|
|
443
|
+
# Returns a boolean Series indicating which values are NaN.
|
|
444
|
+
def is_nan(self, ) -> Expr: ...
|
|
445
|
+
|
|
446
|
+
# Returns a boolean Series indicating which values are not NaN.
|
|
447
|
+
def is_not_nan(self, ) -> Expr: ...
|
|
448
|
+
|
|
449
|
+
def is_not_null(self, ) -> 'Expr': ...
|
|
450
|
+
|
|
451
|
+
def is_null(self, ) -> 'Expr': ...
|
|
452
|
+
|
|
453
|
+
# Get mask of unique values.
|
|
454
|
+
def is_unique(self, ) -> Expr: ...
|
|
455
|
+
|
|
456
|
+
# Compute the kurtosis (Fisher or Pearson) of a dataset.
|
|
457
|
+
def kurtosis(self, fisher: bool=True, bias: bool=True) -> Expr: ...
|
|
458
|
+
|
|
459
|
+
def last(self, ) -> 'Expr': ...
|
|
460
|
+
|
|
461
|
+
# Method equivalent of "less than or equal" operator `expr <= other`.
|
|
462
|
+
def le(self, other: Any) -> Expr: ...
|
|
463
|
+
|
|
464
|
+
# Return the number of elements in the column.
|
|
465
|
+
def len(self, ) -> Expr: ...
|
|
466
|
+
|
|
467
|
+
# Get the first `n` rows (alias for :func:`Expr.head`).
|
|
468
|
+
def limit(self, n: int | Expr=10) -> Expr: ...
|
|
469
|
+
|
|
470
|
+
# Compute the logarithm to a given base.
|
|
471
|
+
def log(self, base: float=2.718281828459045) -> Expr: ...
|
|
472
|
+
|
|
473
|
+
# Compute the base 10 logarithm of the input array, element-wise.
|
|
474
|
+
def log10(self, ) -> Expr: ...
|
|
475
|
+
|
|
476
|
+
# Compute the natural logarithm of each element plus one.
|
|
477
|
+
def log1p(self, ) -> Expr: ...
|
|
478
|
+
|
|
479
|
+
# Calculate the lower bound.
|
|
480
|
+
def lower_bound(self, ) -> Expr: ...
|
|
481
|
+
|
|
482
|
+
# Method equivalent of "less than" operator `expr < other`.
|
|
483
|
+
def lt(self, other: Any) -> Expr: ...
|
|
484
|
+
|
|
485
|
+
# Apply a custom python function to a whole Series or sequence of Series.
|
|
486
|
+
def map_batches(self, function: Callable[[Series], Series | Any], return_dtype: PolarsDataType | None=None, agg_list: bool=False, is_elementwise: bool=False, returns_scalar: bool=False) -> Expr: ...
|
|
487
|
+
|
|
488
|
+
# Map a custom/user-defined function (UDF) to each element of a column.
|
|
489
|
+
def map_elements(self, function: Callable[[Any], Any], return_dtype: PolarsDataType | None=None, skip_nulls: bool=True, pass_name: bool=False, strategy: MapElementsStrategy='thread_local', returns_scalar: bool=False) -> Expr: ...
|
|
490
|
+
|
|
491
|
+
def max(self, ) -> 'Expr': ...
|
|
492
|
+
|
|
493
|
+
def mean(self, ) -> 'Expr': ...
|
|
494
|
+
|
|
495
|
+
def median(self, ) -> Any: ...
|
|
496
|
+
|
|
497
|
+
def min(self, ) -> 'Expr': ...
|
|
498
|
+
|
|
499
|
+
# Method equivalent of modulus operator `expr % other`.
|
|
500
|
+
def mod(self, other: Any) -> Expr: ...
|
|
501
|
+
|
|
502
|
+
# Compute the most occurring value(s).
|
|
503
|
+
def mode(self, ) -> Expr: ...
|
|
504
|
+
|
|
505
|
+
# Method equivalent of multiplication operator `expr * other`.
|
|
506
|
+
def mul(self, other: Any) -> Expr: ...
|
|
507
|
+
|
|
508
|
+
def n_unique(self, ) -> Any: ...
|
|
509
|
+
|
|
510
|
+
# Get maximum value, but propagate/poison encountered NaN values.
|
|
511
|
+
def nan_max(self, ) -> Expr: ...
|
|
512
|
+
|
|
513
|
+
# Get minimum value, but propagate/poison encountered NaN values.
|
|
514
|
+
def nan_min(self, ) -> Expr: ...
|
|
515
|
+
|
|
516
|
+
# Method equivalent of inequality operator `expr != other`.
|
|
517
|
+
def ne(self, other: Any) -> Expr: ...
|
|
518
|
+
|
|
519
|
+
# Method equivalent of equality operator `expr != other` where `None == None`.
|
|
520
|
+
def ne_missing(self, other: Any) -> Expr: ...
|
|
521
|
+
|
|
522
|
+
# Method equivalent of unary minus operator `-expr`.
|
|
523
|
+
def neg(self, ) -> Expr: ...
|
|
524
|
+
|
|
525
|
+
# Negate a boolean expression.
|
|
526
|
+
def not_(self, ) -> Expr: ...
|
|
527
|
+
|
|
528
|
+
# Count null values.
|
|
529
|
+
def null_count(self, ) -> Expr: ...
|
|
530
|
+
|
|
531
|
+
# Method equivalent of bitwise "or" operator `expr | other | ...`.
|
|
532
|
+
def or_(self, *others) -> Expr: ...
|
|
533
|
+
|
|
534
|
+
# Compute expressions over the given groups.
|
|
535
|
+
def over(self, partition_by: ExprStrOrList, *more_exprs, order_by: Optional[ExprStrOrList]=None, descending: bool=False, nulls_last: bool=False, mapping_strategy: Literal['group_to_rows', 'join', 'explode']='group_to_rows') -> 'Expr': ...
|
|
536
|
+
|
|
537
|
+
# Computes percentage change between values.
|
|
538
|
+
def pct_change(self, n: int | IntoExprColumn=1) -> Expr: ...
|
|
539
|
+
|
|
540
|
+
# Get a boolean mask of the local maximum peaks.
|
|
541
|
+
def peak_max(self, ) -> Expr: ...
|
|
542
|
+
|
|
543
|
+
# Get a boolean mask of the local minimum peaks.
|
|
544
|
+
def peak_min(self, ) -> Expr: ...
|
|
545
|
+
|
|
546
|
+
# Offers a structured way to apply a sequence of user-defined functions (UDFs).
|
|
547
|
+
def pipe(self, function: Callable[Concatenate[Expr, P], T], *args, **kwargs) -> T: ...
|
|
548
|
+
|
|
549
|
+
# Method equivalent of exponentiation operator `expr ** exponent`.
|
|
550
|
+
def pow(self, exponent: IntoExprColumn | int | float) -> Expr: ...
|
|
551
|
+
|
|
552
|
+
# Compute the product of an expression.
|
|
553
|
+
def product(self, ) -> Expr: ...
|
|
554
|
+
|
|
555
|
+
# Bin continuous values into discrete categories based on their quantiles.
|
|
556
|
+
def qcut(self, quantiles: Sequence[float] | int, labels: Sequence[str] | None=None, left_closed: bool=False, allow_duplicates: bool=False, include_breaks: bool=False) -> Expr: ...
|
|
557
|
+
|
|
558
|
+
# Get quantile value.
|
|
559
|
+
def quantile(self, quantile: float | Expr, interpolation: RollingInterpolationMethod='nearest') -> Expr: ...
|
|
560
|
+
|
|
561
|
+
# Convert from degrees to radians.
|
|
562
|
+
def radians(self, ) -> Expr: ...
|
|
563
|
+
|
|
564
|
+
# Assign ranks to data, dealing with ties appropriately.
|
|
565
|
+
def rank(self, method: RankMethod='average', descending: bool=False, seed: int | None=None) -> Expr: ...
|
|
566
|
+
|
|
567
|
+
# Create a single chunk of memory for this Series.
|
|
568
|
+
def rechunk(self, ) -> Expr: ...
|
|
569
|
+
|
|
570
|
+
# Register a plugin function.
|
|
571
|
+
def register_plugin(self, lib: str, symbol: str, args: list[IntoExpr] | None=None, kwargs: dict[Any, Any] | None=None, is_elementwise: bool=False, input_wildcard_expansion: bool=False, returns_scalar: bool=False, cast_to_supertypes: bool=False, pass_name_to_apply: bool=False, changes_length: bool=False) -> Expr: ...
|
|
572
|
+
|
|
573
|
+
# Reinterpret the underlying bits as a signed/unsigned integer.
|
|
574
|
+
def reinterpret(self, signed: bool=True) -> Expr: ...
|
|
575
|
+
|
|
576
|
+
# Repeat the elements in this Series as specified in the given expression.
|
|
577
|
+
def repeat_by(self, by: pl.Series | Expr | str | int) -> Expr: ...
|
|
578
|
+
|
|
579
|
+
# Replace the given values by different values of the same data type.
|
|
580
|
+
def replace(self, old: IntoExpr | Sequence[Any] | Mapping[Any, Any], new: IntoExpr | Sequence[Any], default: IntoExpr, return_dtype: PolarsDataType | None=None) -> Expr: ...
|
|
581
|
+
|
|
582
|
+
# Replace all values by different values.
|
|
583
|
+
def replace_strict(self, old: IntoExpr | Sequence[Any] | Mapping[Any, Any], new: IntoExpr | Sequence[Any], default: IntoExpr, return_dtype: PolarsDataType | None=None) -> Expr: ...
|
|
584
|
+
|
|
585
|
+
# Reshape this Expr to a flat column or an Array column.
|
|
586
|
+
def reshape(self, dimensions: tuple[int, ...]) -> Expr: ...
|
|
587
|
+
|
|
588
|
+
# Reverse the selection.
|
|
589
|
+
def reverse(self, ) -> Expr: ...
|
|
590
|
+
|
|
591
|
+
# Compress the column data using run-length encoding.
|
|
592
|
+
def rle(self, ) -> Expr: ...
|
|
593
|
+
|
|
594
|
+
# Get a distinct integer ID for each run of identical values.
|
|
595
|
+
def rle_id(self, ) -> Expr: ...
|
|
596
|
+
|
|
597
|
+
# Create rolling groups based on a temporal or integer column.
|
|
598
|
+
def rolling(self, index_column: str, period: str | timedelta, offset: str | timedelta | None=None, closed: ClosedInterval='right') -> Expr: ...
|
|
599
|
+
|
|
600
|
+
# Compute a custom rolling window function.
|
|
601
|
+
def rolling_map(self, function: Callable[[Series], Any], window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
602
|
+
|
|
603
|
+
# Apply a rolling max (moving max) over the values in this array.
|
|
604
|
+
def rolling_max(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
605
|
+
|
|
606
|
+
# Apply a rolling max based on another column.
|
|
607
|
+
def rolling_max_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
608
|
+
|
|
609
|
+
# Apply a rolling mean (moving mean) over the values in this array.
|
|
610
|
+
def rolling_mean(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
611
|
+
|
|
612
|
+
# Apply a rolling mean based on another column.
|
|
613
|
+
def rolling_mean_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
614
|
+
|
|
615
|
+
# Compute a rolling median.
|
|
616
|
+
def rolling_median(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
617
|
+
|
|
618
|
+
# Compute a rolling median based on another column.
|
|
619
|
+
def rolling_median_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
620
|
+
|
|
621
|
+
# Apply a rolling min (moving min) over the values in this array.
|
|
622
|
+
def rolling_min(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
623
|
+
|
|
624
|
+
# Apply a rolling min based on another column.
|
|
625
|
+
def rolling_min_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
626
|
+
|
|
627
|
+
# Compute a rolling quantile.
|
|
628
|
+
def rolling_quantile(self, quantile: float, interpolation: RollingInterpolationMethod='nearest', window_size: int=2, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
629
|
+
|
|
630
|
+
# Compute a rolling quantile based on another column.
|
|
631
|
+
def rolling_quantile_by(self, by: IntoExpr, window_size: timedelta | str, quantile: float, interpolation: RollingInterpolationMethod='nearest', min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
632
|
+
|
|
633
|
+
# Compute a rolling skew.
|
|
634
|
+
def rolling_skew(self, window_size: int, bias: bool=True) -> Expr: ...
|
|
635
|
+
|
|
636
|
+
# Compute a rolling standard deviation.
|
|
637
|
+
def rolling_std(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False, ddof: int=1) -> Expr: ...
|
|
638
|
+
|
|
639
|
+
# Compute a rolling standard deviation based on another column.
|
|
640
|
+
def rolling_std_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right', ddof: int=1) -> Expr: ...
|
|
641
|
+
|
|
642
|
+
# Apply a rolling sum (moving sum) over the values in this array.
|
|
643
|
+
def rolling_sum(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
644
|
+
|
|
645
|
+
# Apply a rolling sum based on another column.
|
|
646
|
+
def rolling_sum_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
647
|
+
|
|
648
|
+
# Compute a rolling variance.
|
|
649
|
+
def rolling_var(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False, ddof: int=1) -> Expr: ...
|
|
650
|
+
|
|
651
|
+
# Compute a rolling variance based on another column.
|
|
652
|
+
def rolling_var_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right', ddof: int=1) -> Expr: ...
|
|
653
|
+
|
|
654
|
+
# Round underlying floating point data by `decimals` digits.
|
|
655
|
+
def round(self, decimals: int=0) -> Expr: ...
|
|
656
|
+
|
|
657
|
+
# Round to a number of significant figures.
|
|
658
|
+
def round_sig_figs(self, digits: int) -> Expr: ...
|
|
659
|
+
|
|
660
|
+
# Sample from this expression.
|
|
661
|
+
def sample(self, n: int | IntoExprColumn | None=None, fraction: float | IntoExprColumn | None=None, with_replacement: bool=False, shuffle: bool=False, seed: int | None=None) -> Expr: ...
|
|
662
|
+
|
|
663
|
+
# Find indices where elements should be inserted to maintain order.
|
|
664
|
+
def search_sorted(self, element: IntoExpr | np.ndarray[Any, Any], side: SearchSortedSide='any') -> Expr: ...
|
|
665
|
+
|
|
666
|
+
# Flags the expression as 'sorted'.
|
|
667
|
+
def set_sorted(self, descending: bool=False) -> Expr: ...
|
|
668
|
+
|
|
669
|
+
# Shift values by the given number of indices.
|
|
670
|
+
def shift(self, n: int | IntoExprColumn=1, fill_value: IntoExpr | None=None) -> Expr: ...
|
|
671
|
+
|
|
672
|
+
# Shrink numeric columns to the minimal required datatype.
|
|
673
|
+
def shrink_dtype(self, ) -> Expr: ...
|
|
674
|
+
|
|
675
|
+
# Shuffle the contents of this expression.
|
|
676
|
+
def shuffle(self, seed: int | None=None) -> Expr: ...
|
|
677
|
+
|
|
678
|
+
# Compute the element-wise sign function on numeric types.
|
|
679
|
+
def sign(self, ) -> Expr: ...
|
|
680
|
+
|
|
681
|
+
# Compute the element-wise value for the sine.
|
|
682
|
+
def sin(self, ) -> Expr: ...
|
|
683
|
+
|
|
684
|
+
# Compute the element-wise value for the hyperbolic sine.
|
|
685
|
+
def sinh(self, ) -> Expr: ...
|
|
686
|
+
|
|
687
|
+
# Compute the sample skewness of a data set.
|
|
688
|
+
def skew(self, bias: bool=True) -> Expr: ...
|
|
689
|
+
|
|
690
|
+
# Get a slice of this expression.
|
|
691
|
+
def slice(self, offset: int | Expr, length: int | Expr | None=None) -> Expr: ...
|
|
692
|
+
|
|
693
|
+
def sort(self, descending=False, nulls_last=False) -> 'Expr': ...
|
|
694
|
+
|
|
695
|
+
# Sort this column by the ordering of other columns.
|
|
696
|
+
def sort_by(self, by: IntoExpr | Iterable[IntoExpr], *more_by, descending: bool | Sequence[bool]=False, nulls_last: bool | Sequence[bool]=False, multithreaded: bool=True, maintain_order: bool=False) -> Expr: ...
|
|
697
|
+
|
|
698
|
+
# Compute the square root of the elements.
|
|
699
|
+
def sqrt(self, ) -> Expr: ...
|
|
700
|
+
|
|
701
|
+
def std(self, ddof=1) -> Any: ...
|
|
702
|
+
|
|
703
|
+
# Method equivalent of subtraction operator `expr - other`.
|
|
704
|
+
def sub(self, other: Any) -> Expr: ...
|
|
705
|
+
|
|
706
|
+
def sum(self, ) -> 'Expr': ...
|
|
707
|
+
|
|
708
|
+
# Get the last `n` rows.
|
|
709
|
+
def tail(self, n: int | Expr=10) -> Expr: ...
|
|
710
|
+
|
|
711
|
+
# Compute the element-wise value for the tangent.
|
|
712
|
+
def tan(self, ) -> Expr: ...
|
|
713
|
+
|
|
714
|
+
# Compute the element-wise value for the hyperbolic tangent.
|
|
715
|
+
def tanh(self, ) -> Expr: ...
|
|
716
|
+
|
|
717
|
+
# Cast to physical representation of the logical dtype.
|
|
718
|
+
def to_physical(self, ) -> Expr: ...
|
|
719
|
+
|
|
720
|
+
# Return the `k` largest elements.
|
|
721
|
+
def top_k(self, k: int | IntoExprColumn=5) -> Expr: ...
|
|
722
|
+
|
|
723
|
+
# Return the elements corresponding to the `k` largest elements of the `by` column(s).
|
|
724
|
+
def top_k_by(self, by: IntoExpr | Iterable[IntoExpr], k: int | IntoExprColumn=5, reverse: bool | Sequence[bool]=False) -> Expr: ...
|
|
725
|
+
|
|
726
|
+
# Method equivalent of float division operator `expr / other`.
|
|
727
|
+
def truediv(self, other: Any) -> Expr: ...
|
|
728
|
+
|
|
729
|
+
# Get unique values of this expression.
|
|
730
|
+
def unique(self, maintain_order: bool=False) -> Expr: ...
|
|
731
|
+
|
|
732
|
+
# Return a count of the unique values in the order of appearance.
|
|
733
|
+
def unique_counts(self, ) -> Expr: ...
|
|
734
|
+
|
|
735
|
+
# Calculate the upper bound.
|
|
736
|
+
def upper_bound(self, ) -> Expr: ...
|
|
737
|
+
|
|
738
|
+
# Count the occurrences of unique values.
|
|
739
|
+
def value_counts(self, sort: bool=False, parallel: bool=False, name: str | None=None, normalize: bool=False) -> Expr: ...
|
|
740
|
+
|
|
741
|
+
def var(self, ddof=1) -> Any: ...
|
|
742
|
+
|
|
743
|
+
# Filter a single column.
|
|
744
|
+
def where(self, predicate: Expr) -> Expr: ...
|
|
745
|
+
|
|
746
|
+
# Method equivalent of bitwise exclusive-or operator `expr ^ other`.
|
|
747
|
+
def xor(self, other: Any) -> Expr: ...
|
|
748
|
+
|
|
749
|
+
def __init_subclass__(self, *args, **kwargs) -> 'Expr': ...
|
|
750
|
+
|
|
751
|
+
def _repr_html_(self, *args, **kwargs) -> 'Expr': ...
|
|
752
|
+
|
|
753
|
+
def _from_pyexpr(self, *args, **kwargs) -> 'Expr': ...
|
|
754
|
+
|
|
755
|
+
def __bool__(self, *args, **kwargs) -> 'Expr': ...
|
|
756
|
+
|
|
757
|
+
def _map_batches_wrapper(self, *args, **kwargs) -> 'Expr': ...
|
|
758
|
+
|
|
759
|
+
def _skip_batch_predicate(self, *args, **kwargs) -> 'Expr': ...
|
|
760
|
+
|
|
761
|
+
def __delattr__(self, *args, **kwargs) -> 'Expr': ...
|
|
762
|
+
|
|
763
|
+
def __reduce_ex__(self, *args, **kwargs) -> 'Expr': ...
|
|
764
|
+
|
|
765
|
+
def __new__(self, *args, **kwargs) -> 'Expr': ...
|
|
766
|
+
|
|
767
|
+
def __reduce__(self, *args, **kwargs) -> 'Expr': ...
|
|
768
|
+
|
|
769
|
+
def __class__(self, *args, **kwargs) -> 'Expr': ...
|
|
770
|
+
|
|
771
|
+
def __sizeof__(self, *args, **kwargs) -> 'Expr': ...
|
|
772
|
+
|
|
773
|
+
def __setstate__(self, *args, **kwargs) -> 'Expr': ...
|
|
774
|
+
|
|
775
|
+
def __dir__(self, *args, **kwargs) -> 'Expr': ...
|
|
776
|
+
|
|
777
|
+
def __subclasshook__(self, *args, **kwargs) -> 'Expr': ...
|
|
778
|
+
|
|
779
|
+
def __pos__(self, *args, **kwargs) -> 'Expr': ...
|
|
780
|
+
|
|
781
|
+
def __rxor__(self, *args, **kwargs) -> 'Expr': ...
|
|
782
|
+
|
|
783
|
+
def __xor__(self, *args, **kwargs) -> 'Expr': ...
|
|
784
|
+
|
|
785
|
+
def __array_ufunc__(self, *args, **kwargs) -> 'Expr': ...
|
|
786
|
+
|
|
787
|
+
def __rand__(self, *args, **kwargs) -> 'Expr': ...
|
|
788
|
+
|
|
789
|
+
def __str__(self, *args, **kwargs) -> 'Expr': ...
|
|
790
|
+
|
|
791
|
+
def __ror__(self, *args, **kwargs) -> 'Expr': ...
|
|
792
|
+
|
|
793
|
+
def __abs__(self, *args, **kwargs) -> 'Expr': ...
|
|
794
|
+
|
|
795
|
+
def __setattr__(self, *args, **kwargs) -> 'Expr': ...
|
|
796
|
+
|
|
797
|
+
def __format__(self, *args, **kwargs) -> 'Expr': ...
|
|
798
|
+
|
|
799
|
+
def __getattribute__(self, *args, **kwargs) -> 'Expr': ...
|
|
800
|
+
|
|
801
|
+
def __getstate__(self, *args, **kwargs) -> 'Expr': ...
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
class Column(Expr):
|
|
805
|
+
dt: DateTimeMethods
|
|
806
|
+
is_simple: bool
|
|
807
|
+
list: ExprListNameSpace
|
|
808
|
+
name: ExprNameNameSpace
|
|
809
|
+
str: StringMethods
|
|
810
|
+
__module__: Any
|
|
811
|
+
__annotations__: Any
|
|
812
|
+
__doc__: Any
|
|
813
|
+
|
|
814
|
+
def __add__(self, other) -> 'Column': ...
|
|
815
|
+
|
|
816
|
+
def __and__(self, other) -> 'Expr': ...
|
|
817
|
+
|
|
818
|
+
def __eq__(self, other) -> 'Column': ...
|
|
819
|
+
|
|
820
|
+
def __floordiv__(self, other) -> 'Column': ...
|
|
821
|
+
|
|
822
|
+
def __ge__(self, other) -> 'Expr': ...
|
|
823
|
+
|
|
824
|
+
def __gt__(self, other) -> 'Column': ...
|
|
825
|
+
|
|
826
|
+
def __init__(self, name: str, select_input: Optional[transform_schema.SelectInput]=None) -> Any: ...
|
|
827
|
+
|
|
828
|
+
def __invert__(self, ) -> 'Expr': ...
|
|
829
|
+
|
|
830
|
+
def __le__(self, other) -> 'Expr': ...
|
|
831
|
+
|
|
832
|
+
def __lt__(self, other) -> 'Column': ...
|
|
833
|
+
|
|
834
|
+
def __mod__(self, other) -> 'Column': ...
|
|
835
|
+
|
|
836
|
+
def __mul__(self, other) -> 'Column': ...
|
|
837
|
+
|
|
838
|
+
def __ne__(self, other) -> 'Column': ...
|
|
839
|
+
|
|
840
|
+
def __neg__(self, ) -> 'Expr': ...
|
|
841
|
+
|
|
842
|
+
def __or__(self, other) -> 'Expr': ...
|
|
843
|
+
|
|
844
|
+
def __pow__(self, exponent) -> 'Column': ...
|
|
845
|
+
|
|
846
|
+
def __radd__(self, other) -> Any: ...
|
|
847
|
+
|
|
848
|
+
def __repr__(self, ) -> str: ...
|
|
849
|
+
|
|
850
|
+
def __rfloordiv__(self, other) -> Any: ...
|
|
851
|
+
|
|
852
|
+
def __rmod__(self, other) -> Any: ...
|
|
853
|
+
|
|
854
|
+
def __rmul__(self, other) -> Any: ...
|
|
855
|
+
|
|
856
|
+
def __rpow__(self, other) -> Any: ...
|
|
857
|
+
|
|
858
|
+
def __rsub__(self, other) -> Any: ...
|
|
859
|
+
|
|
860
|
+
def __rtruediv__(self, other) -> Any: ...
|
|
861
|
+
|
|
862
|
+
def __sub__(self, other) -> 'Column': ...
|
|
863
|
+
|
|
864
|
+
def __truediv__(self, other) -> 'Column': ...
|
|
865
|
+
|
|
866
|
+
# Creates a new Expr for binary operations.
|
|
867
|
+
def _create_binary_op_expr(self, op_symbol: str, other: Any, result_expr: Optional[pl.Expr]) -> 'Expr': ...
|
|
868
|
+
|
|
869
|
+
# Creates a new Expr instance, appending method call to repr string.
|
|
870
|
+
def _create_next_expr(self, *args, method_name: str, result_expr: Optional[pl.Expr], convertable_to_code: bool=None, is_complex: bool, _function_sources: Optional[List[str]]=None, **kwargs) -> 'Expr': ...
|
|
871
|
+
|
|
872
|
+
# Helper to get appropriate string representation for an expression
|
|
873
|
+
def _get_expr_repr(self, expr) -> Any: ...
|
|
874
|
+
|
|
875
|
+
# Compute absolute values.
|
|
876
|
+
def abs(self, ) -> Expr: ...
|
|
877
|
+
|
|
878
|
+
# Method equivalent of addition operator `expr + other`.
|
|
879
|
+
def add(self, other: Any) -> Expr: ...
|
|
880
|
+
|
|
881
|
+
# Get the group indexes of the group by operation.
|
|
882
|
+
def agg_groups(self, ) -> Expr: ...
|
|
883
|
+
|
|
884
|
+
# Rename a column, returning a new Column instance.
|
|
885
|
+
def alias(self, new_name: str) -> 'Column': ...
|
|
886
|
+
|
|
887
|
+
# Return whether all values in the column are `True`.
|
|
888
|
+
def all(self, ignore_nulls: bool=True) -> Expr: ...
|
|
889
|
+
|
|
890
|
+
# Method equivalent of bitwise "and" operator `expr & other & ...`.
|
|
891
|
+
def and_(self, *others) -> Expr: ...
|
|
892
|
+
|
|
893
|
+
# Return whether any of the values in the column are `True`.
|
|
894
|
+
def any(self, ignore_nulls: bool=True) -> Expr: ...
|
|
895
|
+
|
|
896
|
+
# Append expressions.
|
|
897
|
+
def append(self, other: IntoExpr, upcast: bool=True) -> Expr: ...
|
|
898
|
+
|
|
899
|
+
# Approximate count of unique values.
|
|
900
|
+
def approx_n_unique(self, ) -> Expr: ...
|
|
901
|
+
|
|
902
|
+
# Compute the element-wise value for the inverse cosine.
|
|
903
|
+
def arccos(self, ) -> Expr: ...
|
|
904
|
+
|
|
905
|
+
# Compute the element-wise value for the inverse hyperbolic cosine.
|
|
906
|
+
def arccosh(self, ) -> Expr: ...
|
|
907
|
+
|
|
908
|
+
# Compute the element-wise value for the inverse sine.
|
|
909
|
+
def arcsin(self, ) -> Expr: ...
|
|
910
|
+
|
|
911
|
+
# Compute the element-wise value for the inverse hyperbolic sine.
|
|
912
|
+
def arcsinh(self, ) -> Expr: ...
|
|
913
|
+
|
|
914
|
+
# Compute the element-wise value for the inverse tangent.
|
|
915
|
+
def arctan(self, ) -> Expr: ...
|
|
916
|
+
|
|
917
|
+
# Compute the element-wise value for the inverse hyperbolic tangent.
|
|
918
|
+
def arctanh(self, ) -> Expr: ...
|
|
919
|
+
|
|
920
|
+
# Get the index of the maximal value.
|
|
921
|
+
def arg_max(self, ) -> Expr: ...
|
|
922
|
+
|
|
923
|
+
# Get the index of the minimal value.
|
|
924
|
+
def arg_min(self, ) -> Expr: ...
|
|
925
|
+
|
|
926
|
+
def arg_sort(self, descending: bool=False, nulls_last: bool=False) -> 'Expr': ...
|
|
927
|
+
|
|
928
|
+
# Return indices where expression evaluates `True`.
|
|
929
|
+
def arg_true(self, ) -> Expr: ...
|
|
930
|
+
|
|
931
|
+
def arg_unique(self, ) -> 'Expr': ...
|
|
932
|
+
|
|
933
|
+
# Fill missing values with the next non-null value.
|
|
934
|
+
def backward_fill(self, limit: int | None=None) -> Expr: ...
|
|
935
|
+
|
|
936
|
+
# Perform an aggregation of bitwise ANDs.
|
|
937
|
+
def bitwise_and(self, ) -> Expr: ...
|
|
938
|
+
|
|
939
|
+
# Evaluate the number of set bits.
|
|
940
|
+
def bitwise_count_ones(self, ) -> Expr: ...
|
|
941
|
+
|
|
942
|
+
# Evaluate the number of unset bits.
|
|
943
|
+
def bitwise_count_zeros(self, ) -> Expr: ...
|
|
944
|
+
|
|
945
|
+
# Evaluate the number most-significant set bits before seeing an unset bit.
|
|
946
|
+
def bitwise_leading_ones(self, ) -> Expr: ...
|
|
947
|
+
|
|
948
|
+
# Evaluate the number most-significant unset bits before seeing a set bit.
|
|
949
|
+
def bitwise_leading_zeros(self, ) -> Expr: ...
|
|
950
|
+
|
|
951
|
+
# Perform an aggregation of bitwise ORs.
|
|
952
|
+
def bitwise_or(self, ) -> Expr: ...
|
|
953
|
+
|
|
954
|
+
# Evaluate the number least-significant set bits before seeing an unset bit.
|
|
955
|
+
def bitwise_trailing_ones(self, ) -> Expr: ...
|
|
956
|
+
|
|
957
|
+
# Evaluate the number least-significant unset bits before seeing a set bit.
|
|
958
|
+
def bitwise_trailing_zeros(self, ) -> Expr: ...
|
|
959
|
+
|
|
960
|
+
# Perform an aggregation of bitwise XORs.
|
|
961
|
+
def bitwise_xor(self, ) -> Expr: ...
|
|
962
|
+
|
|
963
|
+
# Return the `k` smallest elements.
|
|
964
|
+
def bottom_k(self, k: int | IntoExprColumn=5) -> Expr: ...
|
|
965
|
+
|
|
966
|
+
# Return the elements corresponding to the `k` smallest elements of the `by` column(s).
|
|
967
|
+
def bottom_k_by(self, by: IntoExpr | Iterable[IntoExpr], k: int | IntoExprColumn=5, reverse: bool | Sequence[bool]=False) -> Expr: ...
|
|
968
|
+
|
|
969
|
+
# Change the data type of a column, returning a new Column instance.
|
|
970
|
+
def cast(self, dtype: Union[pl.DataType, str, pl.datatypes.classes.DataTypeClass], strict=True) -> 'Column': ...
|
|
971
|
+
|
|
972
|
+
# Compute the cube root of the elements.
|
|
973
|
+
def cbrt(self, ) -> Expr: ...
|
|
974
|
+
|
|
975
|
+
# Rounds up to the nearest integer value.
|
|
976
|
+
def ceil(self, ) -> Expr: ...
|
|
977
|
+
|
|
978
|
+
# Set values outside the given boundaries to the boundary value.
|
|
979
|
+
def clip(self, lower_bound: NumericLiteral | TemporalLiteral | IntoExprColumn | None=None, upper_bound: NumericLiteral | TemporalLiteral | IntoExprColumn | None=None) -> Expr: ...
|
|
980
|
+
|
|
981
|
+
# Compute the element-wise value for the cosine.
|
|
982
|
+
def cos(self, ) -> Expr: ...
|
|
983
|
+
|
|
984
|
+
# Compute the element-wise value for the hyperbolic cosine.
|
|
985
|
+
def cosh(self, ) -> Expr: ...
|
|
986
|
+
|
|
987
|
+
# Compute the element-wise value for the cotangent.
|
|
988
|
+
def cot(self, ) -> Expr: ...
|
|
989
|
+
|
|
990
|
+
def count(self, ) -> 'Column': ...
|
|
991
|
+
|
|
992
|
+
# Return the cumulative count of the non-null values in the column.
|
|
993
|
+
def cum_count(self, reverse: bool=False) -> 'Expr': ...
|
|
994
|
+
|
|
995
|
+
# Get an array with the cumulative max computed at every element.
|
|
996
|
+
def cum_max(self, reverse: bool=False) -> Expr: ...
|
|
997
|
+
|
|
998
|
+
# Get an array with the cumulative min computed at every element.
|
|
999
|
+
def cum_min(self, reverse: bool=False) -> Expr: ...
|
|
1000
|
+
|
|
1001
|
+
# Get an array with the cumulative product computed at every element.
|
|
1002
|
+
def cum_prod(self, reverse: bool=False) -> Expr: ...
|
|
1003
|
+
|
|
1004
|
+
# Get an array with the cumulative sum computed at every element.
|
|
1005
|
+
def cum_sum(self, reverse: bool=False) -> Expr: ...
|
|
1006
|
+
|
|
1007
|
+
# Run an expression over a sliding window that increases `1` slot every iteration.
|
|
1008
|
+
def cumulative_eval(self, expr: Expr, min_samples: int=1, parallel: bool=False) -> Expr: ...
|
|
1009
|
+
|
|
1010
|
+
# Bin continuous values into discrete categories.
|
|
1011
|
+
def cut(self, breaks: Sequence[float], labels: Sequence[str] | None=None, left_closed: bool=False, include_breaks: bool=False) -> Expr: ...
|
|
1012
|
+
|
|
1013
|
+
# Convert from radians to degrees.
|
|
1014
|
+
def degrees(self, ) -> Expr: ...
|
|
1015
|
+
|
|
1016
|
+
# Read a serialized expression from a file.
|
|
1017
|
+
def deserialize(self, source: str | Path | IOBase | bytes, format: SerializationFormat='binary') -> Expr: ...
|
|
1018
|
+
|
|
1019
|
+
# Calculate the first discrete difference between shifted items.
|
|
1020
|
+
def diff(self, n: int=1, null_behavior: NullBehavior='ignore') -> Expr: ...
|
|
1021
|
+
|
|
1022
|
+
# Compute the dot/inner product between two Expressions.
|
|
1023
|
+
def dot(self, other: Expr | str) -> Expr: ...
|
|
1024
|
+
|
|
1025
|
+
# Drop all floating point NaN values.
|
|
1026
|
+
def drop_nans(self, ) -> Expr: ...
|
|
1027
|
+
|
|
1028
|
+
# Drop all null values.
|
|
1029
|
+
def drop_nulls(self, ) -> Expr: ...
|
|
1030
|
+
|
|
1031
|
+
# Computes the entropy.
|
|
1032
|
+
def entropy(self, base: float=2.718281828459045, normalize: bool=True) -> Expr: ...
|
|
1033
|
+
|
|
1034
|
+
# Method equivalent of equality operator `expr == other`.
|
|
1035
|
+
def eq(self, other: Any) -> Expr: ...
|
|
1036
|
+
|
|
1037
|
+
# Method equivalent of equality operator `expr == other` where `None == None`.
|
|
1038
|
+
def eq_missing(self, other: Any) -> Expr: ...
|
|
1039
|
+
|
|
1040
|
+
# Compute exponentially-weighted moving average.
|
|
1041
|
+
def ewm_mean(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
1042
|
+
|
|
1043
|
+
# Compute time-based exponentially weighted moving average.
|
|
1044
|
+
def ewm_mean_by(self, by: str | IntoExpr, half_life: str | timedelta) -> Expr: ...
|
|
1045
|
+
|
|
1046
|
+
# Compute exponentially-weighted moving standard deviation.
|
|
1047
|
+
def ewm_std(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, bias: bool=False, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
1048
|
+
|
|
1049
|
+
# Compute exponentially-weighted moving variance.
|
|
1050
|
+
def ewm_var(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, bias: bool=False, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
1051
|
+
|
|
1052
|
+
# Exclude columns from a multi-column expression.
|
|
1053
|
+
def exclude(self, columns: str | PolarsDataType | Collection[str] | Collection[PolarsDataType], *more_columns) -> Expr: ...
|
|
1054
|
+
|
|
1055
|
+
# Compute the exponential, element-wise.
|
|
1056
|
+
def exp(self, ) -> Expr: ...
|
|
1057
|
+
|
|
1058
|
+
def explode(self, ) -> Any: ...
|
|
1059
|
+
|
|
1060
|
+
# Extremely fast method for extending the Series with 'n' copies of a value.
|
|
1061
|
+
def extend_constant(self, value: IntoExpr, n: int | IntoExprColumn) -> Expr: ...
|
|
1062
|
+
|
|
1063
|
+
def fill_nan(self, value) -> 'Column': ...
|
|
1064
|
+
|
|
1065
|
+
def fill_null(self, value) -> 'Column': ...
|
|
1066
|
+
|
|
1067
|
+
# Filter expression
|
|
1068
|
+
def filter(self, *predicates, **constraints) -> 'Expr': ...
|
|
1069
|
+
|
|
1070
|
+
def first(self, ) -> 'Column': ...
|
|
1071
|
+
|
|
1072
|
+
# Flatten a list or string column.
|
|
1073
|
+
def flatten(self, ) -> Expr: ...
|
|
1074
|
+
|
|
1075
|
+
# Rounds down to the nearest integer value.
|
|
1076
|
+
def floor(self, ) -> Expr: ...
|
|
1077
|
+
|
|
1078
|
+
# Method equivalent of integer division operator `expr // other`.
|
|
1079
|
+
def floordiv(self, other: Any) -> Expr: ...
|
|
1080
|
+
|
|
1081
|
+
# Fill missing values with the last non-null value.
|
|
1082
|
+
def forward_fill(self, limit: int | None=None) -> Expr: ...
|
|
1083
|
+
|
|
1084
|
+
# Read an expression from a JSON encoded string to construct an Expression.
|
|
1085
|
+
def from_json(self, value: str) -> Expr: ...
|
|
1086
|
+
|
|
1087
|
+
# Take values by index.
|
|
1088
|
+
def gather(self, indices: int | Sequence[int] | IntoExpr | Series | np.ndarray[Any, Any]) -> Expr: ...
|
|
1089
|
+
|
|
1090
|
+
# Take every nth value in the Series and return as a new Series.
|
|
1091
|
+
def gather_every(self, n: int, offset: int=0) -> Expr: ...
|
|
1092
|
+
|
|
1093
|
+
# Method equivalent of "greater than or equal" operator `expr >= other`.
|
|
1094
|
+
def ge(self, other: Any) -> Expr: ...
|
|
1095
|
+
|
|
1096
|
+
# Return a single value by index.
|
|
1097
|
+
def get(self, index: int | Expr) -> Expr: ...
|
|
1098
|
+
|
|
1099
|
+
# Get the Polars code representation of this expression, including any function definitions.
|
|
1100
|
+
def get_polars_code(self, ) -> str: ...
|
|
1101
|
+
|
|
1102
|
+
# Method equivalent of "greater than" operator `expr > other`.
|
|
1103
|
+
def gt(self, other: Any) -> Expr: ...
|
|
1104
|
+
|
|
1105
|
+
# Check whether the expression contains one or more null values.
|
|
1106
|
+
def has_nulls(self, ) -> Expr: ...
|
|
1107
|
+
|
|
1108
|
+
# Hash the elements in the selection.
|
|
1109
|
+
def hash(self, seed: int=0, seed_1: int | None=None, seed_2: int | None=None, seed_3: int | None=None) -> Expr: ...
|
|
1110
|
+
|
|
1111
|
+
# Get the first `n` rows.
|
|
1112
|
+
def head(self, n: int | Expr=10) -> Expr: ...
|
|
1113
|
+
|
|
1114
|
+
# Bin values into buckets and count their occurrences.
|
|
1115
|
+
def hist(self, bins: IntoExpr | None=None, bin_count: int | None=None, include_category: bool=False, include_breakpoint: bool=False) -> Expr: ...
|
|
1116
|
+
|
|
1117
|
+
def implode(self, ) -> Any: ...
|
|
1118
|
+
|
|
1119
|
+
# Get the index of the first occurrence of a value, or ``None`` if it's not found.
|
|
1120
|
+
def index_of(self, element: IntoExpr) -> Expr: ...
|
|
1121
|
+
|
|
1122
|
+
# Print the value that this expression evaluates to and pass on the value.
|
|
1123
|
+
def inspect(self, fmt: str='{}') -> Expr: ...
|
|
1124
|
+
|
|
1125
|
+
# Fill null values using interpolation.
|
|
1126
|
+
def interpolate(self, method: InterpolationMethod='linear') -> Expr: ...
|
|
1127
|
+
|
|
1128
|
+
# Fill null values using interpolation based on another column.
|
|
1129
|
+
def interpolate_by(self, by: IntoExpr) -> Expr: ...
|
|
1130
|
+
|
|
1131
|
+
# Check if this expression is between the given lower and upper bounds.
|
|
1132
|
+
def is_between(self, lower_bound: IntoExpr, upper_bound: IntoExpr, closed: ClosedInterval='both') -> Expr: ...
|
|
1133
|
+
|
|
1134
|
+
# Return a boolean mask indicating duplicated values.
|
|
1135
|
+
def is_duplicated(self, ) -> Expr: ...
|
|
1136
|
+
|
|
1137
|
+
# Returns a boolean Series indicating which values are finite.
|
|
1138
|
+
def is_finite(self, ) -> Expr: ...
|
|
1139
|
+
|
|
1140
|
+
# Return a boolean mask indicating the first occurrence of each distinct value.
|
|
1141
|
+
def is_first_distinct(self, ) -> Expr: ...
|
|
1142
|
+
|
|
1143
|
+
def is_in(self, values) -> Any: ...
|
|
1144
|
+
|
|
1145
|
+
# Returns a boolean Series indicating which values are infinite.
|
|
1146
|
+
def is_infinite(self, ) -> Expr: ...
|
|
1147
|
+
|
|
1148
|
+
# Return a boolean mask indicating the last occurrence of each distinct value.
|
|
1149
|
+
def is_last_distinct(self, ) -> Expr: ...
|
|
1150
|
+
|
|
1151
|
+
# Returns a boolean Series indicating which values are NaN.
|
|
1152
|
+
def is_nan(self, ) -> Expr: ...
|
|
1153
|
+
|
|
1154
|
+
# Returns a boolean Series indicating which values are not NaN.
|
|
1155
|
+
def is_not_nan(self, ) -> Expr: ...
|
|
1156
|
+
|
|
1157
|
+
def is_not_null(self, ) -> 'Column': ...
|
|
1158
|
+
|
|
1159
|
+
def is_null(self, ) -> 'Column': ...
|
|
1160
|
+
|
|
1161
|
+
# Get mask of unique values.
|
|
1162
|
+
def is_unique(self, ) -> Expr: ...
|
|
1163
|
+
|
|
1164
|
+
# Compute the kurtosis (Fisher or Pearson) of a dataset.
|
|
1165
|
+
def kurtosis(self, fisher: bool=True, bias: bool=True) -> Expr: ...
|
|
1166
|
+
|
|
1167
|
+
def last(self, ) -> 'Column': ...
|
|
1168
|
+
|
|
1169
|
+
# Method equivalent of "less than or equal" operator `expr <= other`.
|
|
1170
|
+
def le(self, other: Any) -> Expr: ...
|
|
1171
|
+
|
|
1172
|
+
# Return the number of elements in the column.
|
|
1173
|
+
def len(self, ) -> Expr: ...
|
|
1174
|
+
|
|
1175
|
+
# Get the first `n` rows (alias for :func:`Expr.head`).
|
|
1176
|
+
def limit(self, n: int | Expr=10) -> Expr: ...
|
|
1177
|
+
|
|
1178
|
+
# Compute the logarithm to a given base.
|
|
1179
|
+
def log(self, base: float=2.718281828459045) -> Expr: ...
|
|
1180
|
+
|
|
1181
|
+
# Compute the base 10 logarithm of the input array, element-wise.
|
|
1182
|
+
def log10(self, ) -> Expr: ...
|
|
1183
|
+
|
|
1184
|
+
# Compute the natural logarithm of each element plus one.
|
|
1185
|
+
def log1p(self, ) -> Expr: ...
|
|
1186
|
+
|
|
1187
|
+
# Calculate the lower bound.
|
|
1188
|
+
def lower_bound(self, ) -> Expr: ...
|
|
1189
|
+
|
|
1190
|
+
# Method equivalent of "less than" operator `expr < other`.
|
|
1191
|
+
def lt(self, other: Any) -> Expr: ...
|
|
1192
|
+
|
|
1193
|
+
# Apply a custom python function to a whole Series or sequence of Series.
|
|
1194
|
+
def map_batches(self, function: Callable[[Series], Series | Any], return_dtype: PolarsDataType | None=None, agg_list: bool=False, is_elementwise: bool=False, returns_scalar: bool=False) -> Expr: ...
|
|
1195
|
+
|
|
1196
|
+
# Map a custom/user-defined function (UDF) to each element of a column.
|
|
1197
|
+
def map_elements(self, function: Callable[[Any], Any], return_dtype: PolarsDataType | None=None, skip_nulls: bool=True, pass_name: bool=False, strategy: MapElementsStrategy='thread_local', returns_scalar: bool=False) -> Expr: ...
|
|
1198
|
+
|
|
1199
|
+
def max(self, ) -> 'Column': ...
|
|
1200
|
+
|
|
1201
|
+
def mean(self, ) -> 'Column': ...
|
|
1202
|
+
|
|
1203
|
+
def median(self, ) -> Any: ...
|
|
1204
|
+
|
|
1205
|
+
def min(self, ) -> 'Column': ...
|
|
1206
|
+
|
|
1207
|
+
# Method equivalent of modulus operator `expr % other`.
|
|
1208
|
+
def mod(self, other: Any) -> Expr: ...
|
|
1209
|
+
|
|
1210
|
+
# Compute the most occurring value(s).
|
|
1211
|
+
def mode(self, ) -> Expr: ...
|
|
1212
|
+
|
|
1213
|
+
# Method equivalent of multiplication operator `expr * other`.
|
|
1214
|
+
def mul(self, other: Any) -> Expr: ...
|
|
1215
|
+
|
|
1216
|
+
def n_unique(self, ) -> Any: ...
|
|
1217
|
+
|
|
1218
|
+
# Get maximum value, but propagate/poison encountered NaN values.
|
|
1219
|
+
def nan_max(self, ) -> Expr: ...
|
|
1220
|
+
|
|
1221
|
+
# Get minimum value, but propagate/poison encountered NaN values.
|
|
1222
|
+
def nan_min(self, ) -> Expr: ...
|
|
1223
|
+
|
|
1224
|
+
# Method equivalent of inequality operator `expr != other`.
|
|
1225
|
+
def ne(self, other: Any) -> Expr: ...
|
|
1226
|
+
|
|
1227
|
+
# Method equivalent of equality operator `expr != other` where `None == None`.
|
|
1228
|
+
def ne_missing(self, other: Any) -> Expr: ...
|
|
1229
|
+
|
|
1230
|
+
# Method equivalent of unary minus operator `-expr`.
|
|
1231
|
+
def neg(self, ) -> Expr: ...
|
|
1232
|
+
|
|
1233
|
+
# Negate a boolean expression.
|
|
1234
|
+
def not_(self, ) -> Expr: ...
|
|
1235
|
+
|
|
1236
|
+
# Count null values.
|
|
1237
|
+
def null_count(self, ) -> Expr: ...
|
|
1238
|
+
|
|
1239
|
+
# Method equivalent of bitwise "or" operator `expr | other | ...`.
|
|
1240
|
+
def or_(self, *others) -> Expr: ...
|
|
1241
|
+
|
|
1242
|
+
# Compute expressions over the given groups.
|
|
1243
|
+
def over(self, partition_by: ExprStrOrList, *more_exprs, order_by: Optional[ExprStrOrList]=None, descending: bool=False, nulls_last: bool=False, mapping_strategy: Literal['group_to_rows', 'join', 'explode']='group_to_rows') -> 'Expr': ...
|
|
1244
|
+
|
|
1245
|
+
# Computes percentage change between values.
|
|
1246
|
+
def pct_change(self, n: int | IntoExprColumn=1) -> Expr: ...
|
|
1247
|
+
|
|
1248
|
+
# Get a boolean mask of the local maximum peaks.
|
|
1249
|
+
def peak_max(self, ) -> Expr: ...
|
|
1250
|
+
|
|
1251
|
+
# Get a boolean mask of the local minimum peaks.
|
|
1252
|
+
def peak_min(self, ) -> Expr: ...
|
|
1253
|
+
|
|
1254
|
+
# Offers a structured way to apply a sequence of user-defined functions (UDFs).
|
|
1255
|
+
def pipe(self, function: Callable[Concatenate[Expr, P], T], *args, **kwargs) -> T: ...
|
|
1256
|
+
|
|
1257
|
+
# Method equivalent of exponentiation operator `expr ** exponent`.
|
|
1258
|
+
def pow(self, exponent: IntoExprColumn | int | float) -> Expr: ...
|
|
1259
|
+
|
|
1260
|
+
# Compute the product of an expression.
|
|
1261
|
+
def product(self, ) -> Expr: ...
|
|
1262
|
+
|
|
1263
|
+
# Bin continuous values into discrete categories based on their quantiles.
|
|
1264
|
+
def qcut(self, quantiles: Sequence[float] | int, labels: Sequence[str] | None=None, left_closed: bool=False, allow_duplicates: bool=False, include_breaks: bool=False) -> Expr: ...
|
|
1265
|
+
|
|
1266
|
+
# Get quantile value.
|
|
1267
|
+
def quantile(self, quantile: float | Expr, interpolation: RollingInterpolationMethod='nearest') -> Expr: ...
|
|
1268
|
+
|
|
1269
|
+
# Convert from degrees to radians.
|
|
1270
|
+
def radians(self, ) -> Expr: ...
|
|
1271
|
+
|
|
1272
|
+
# Assign ranks to data, dealing with ties appropriately.
|
|
1273
|
+
def rank(self, method: RankMethod='average', descending: bool=False, seed: int | None=None) -> Expr: ...
|
|
1274
|
+
|
|
1275
|
+
# Create a single chunk of memory for this Series.
|
|
1276
|
+
def rechunk(self, ) -> Expr: ...
|
|
1277
|
+
|
|
1278
|
+
# Register a plugin function.
|
|
1279
|
+
def register_plugin(self, lib: str, symbol: str, args: list[IntoExpr] | None=None, kwargs: dict[Any, Any] | None=None, is_elementwise: bool=False, input_wildcard_expansion: bool=False, returns_scalar: bool=False, cast_to_supertypes: bool=False, pass_name_to_apply: bool=False, changes_length: bool=False) -> Expr: ...
|
|
1280
|
+
|
|
1281
|
+
# Reinterpret the underlying bits as a signed/unsigned integer.
|
|
1282
|
+
def reinterpret(self, signed: bool=True) -> Expr: ...
|
|
1283
|
+
|
|
1284
|
+
# Repeat the elements in this Series as specified in the given expression.
|
|
1285
|
+
def repeat_by(self, by: pl.Series | Expr | str | int) -> Expr: ...
|
|
1286
|
+
|
|
1287
|
+
# Replace the given values by different values of the same data type.
|
|
1288
|
+
def replace(self, old: IntoExpr | Sequence[Any] | Mapping[Any, Any], new: IntoExpr | Sequence[Any], default: IntoExpr, return_dtype: PolarsDataType | None=None) -> Expr: ...
|
|
1289
|
+
|
|
1290
|
+
# Replace all values by different values.
|
|
1291
|
+
def replace_strict(self, old: IntoExpr | Sequence[Any] | Mapping[Any, Any], new: IntoExpr | Sequence[Any], default: IntoExpr, return_dtype: PolarsDataType | None=None) -> Expr: ...
|
|
1292
|
+
|
|
1293
|
+
# Reshape this Expr to a flat column or an Array column.
|
|
1294
|
+
def reshape(self, dimensions: tuple[int, ...]) -> Expr: ...
|
|
1295
|
+
|
|
1296
|
+
# Reverse the selection.
|
|
1297
|
+
def reverse(self, ) -> Expr: ...
|
|
1298
|
+
|
|
1299
|
+
# Compress the column data using run-length encoding.
|
|
1300
|
+
def rle(self, ) -> Expr: ...
|
|
1301
|
+
|
|
1302
|
+
# Get a distinct integer ID for each run of identical values.
|
|
1303
|
+
def rle_id(self, ) -> Expr: ...
|
|
1304
|
+
|
|
1305
|
+
# Create rolling groups based on a temporal or integer column.
|
|
1306
|
+
def rolling(self, index_column: str, period: str | timedelta, offset: str | timedelta | None=None, closed: ClosedInterval='right') -> Expr: ...
|
|
1307
|
+
|
|
1308
|
+
# Compute a custom rolling window function.
|
|
1309
|
+
def rolling_map(self, function: Callable[[Series], Any], window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1310
|
+
|
|
1311
|
+
# Apply a rolling max (moving max) over the values in this array.
|
|
1312
|
+
def rolling_max(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1313
|
+
|
|
1314
|
+
# Apply a rolling max based on another column.
|
|
1315
|
+
def rolling_max_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1316
|
+
|
|
1317
|
+
# Apply a rolling mean (moving mean) over the values in this array.
|
|
1318
|
+
def rolling_mean(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1319
|
+
|
|
1320
|
+
# Apply a rolling mean based on another column.
|
|
1321
|
+
def rolling_mean_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1322
|
+
|
|
1323
|
+
# Compute a rolling median.
|
|
1324
|
+
def rolling_median(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1325
|
+
|
|
1326
|
+
# Compute a rolling median based on another column.
|
|
1327
|
+
def rolling_median_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1328
|
+
|
|
1329
|
+
# Apply a rolling min (moving min) over the values in this array.
|
|
1330
|
+
def rolling_min(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1331
|
+
|
|
1332
|
+
# Apply a rolling min based on another column.
|
|
1333
|
+
def rolling_min_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1334
|
+
|
|
1335
|
+
# Compute a rolling quantile.
|
|
1336
|
+
def rolling_quantile(self, quantile: float, interpolation: RollingInterpolationMethod='nearest', window_size: int=2, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1337
|
+
|
|
1338
|
+
# Compute a rolling quantile based on another column.
|
|
1339
|
+
def rolling_quantile_by(self, by: IntoExpr, window_size: timedelta | str, quantile: float, interpolation: RollingInterpolationMethod='nearest', min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1340
|
+
|
|
1341
|
+
# Compute a rolling skew.
|
|
1342
|
+
def rolling_skew(self, window_size: int, bias: bool=True) -> Expr: ...
|
|
1343
|
+
|
|
1344
|
+
# Compute a rolling standard deviation.
|
|
1345
|
+
def rolling_std(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False, ddof: int=1) -> Expr: ...
|
|
1346
|
+
|
|
1347
|
+
# Compute a rolling standard deviation based on another column.
|
|
1348
|
+
def rolling_std_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right', ddof: int=1) -> Expr: ...
|
|
1349
|
+
|
|
1350
|
+
# Apply a rolling sum (moving sum) over the values in this array.
|
|
1351
|
+
def rolling_sum(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1352
|
+
|
|
1353
|
+
# Apply a rolling sum based on another column.
|
|
1354
|
+
def rolling_sum_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1355
|
+
|
|
1356
|
+
# Compute a rolling variance.
|
|
1357
|
+
def rolling_var(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False, ddof: int=1) -> Expr: ...
|
|
1358
|
+
|
|
1359
|
+
# Compute a rolling variance based on another column.
|
|
1360
|
+
def rolling_var_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right', ddof: int=1) -> Expr: ...
|
|
1361
|
+
|
|
1362
|
+
# Round underlying floating point data by `decimals` digits.
|
|
1363
|
+
def round(self, decimals: int=0) -> Expr: ...
|
|
1364
|
+
|
|
1365
|
+
# Round to a number of significant figures.
|
|
1366
|
+
def round_sig_figs(self, digits: int) -> Expr: ...
|
|
1367
|
+
|
|
1368
|
+
# Sample from this expression.
|
|
1369
|
+
def sample(self, n: int | IntoExprColumn | None=None, fraction: float | IntoExprColumn | None=None, with_replacement: bool=False, shuffle: bool=False, seed: int | None=None) -> Expr: ...
|
|
1370
|
+
|
|
1371
|
+
# Find indices where elements should be inserted to maintain order.
|
|
1372
|
+
def search_sorted(self, element: IntoExpr | np.ndarray[Any, Any], side: SearchSortedSide='any') -> Expr: ...
|
|
1373
|
+
|
|
1374
|
+
# Flags the expression as 'sorted'.
|
|
1375
|
+
def set_sorted(self, descending: bool=False) -> Expr: ...
|
|
1376
|
+
|
|
1377
|
+
# Shift values by the given number of indices.
|
|
1378
|
+
def shift(self, n: int | IntoExprColumn=1, fill_value: IntoExpr | None=None) -> Expr: ...
|
|
1379
|
+
|
|
1380
|
+
# Shrink numeric columns to the minimal required datatype.
|
|
1381
|
+
def shrink_dtype(self, ) -> Expr: ...
|
|
1382
|
+
|
|
1383
|
+
# Shuffle the contents of this expression.
|
|
1384
|
+
def shuffle(self, seed: int | None=None) -> Expr: ...
|
|
1385
|
+
|
|
1386
|
+
# Compute the element-wise sign function on numeric types.
|
|
1387
|
+
def sign(self, ) -> Expr: ...
|
|
1388
|
+
|
|
1389
|
+
# Compute the element-wise value for the sine.
|
|
1390
|
+
def sin(self, ) -> Expr: ...
|
|
1391
|
+
|
|
1392
|
+
# Compute the element-wise value for the hyperbolic sine.
|
|
1393
|
+
def sinh(self, ) -> Expr: ...
|
|
1394
|
+
|
|
1395
|
+
# Compute the sample skewness of a data set.
|
|
1396
|
+
def skew(self, bias: bool=True) -> Expr: ...
|
|
1397
|
+
|
|
1398
|
+
# Get a slice of this expression.
|
|
1399
|
+
def slice(self, offset: int | Expr, length: int | Expr | None=None) -> Expr: ...
|
|
1400
|
+
|
|
1401
|
+
def sort(self, descending=False, nulls_last=False) -> 'Column': ...
|
|
1402
|
+
|
|
1403
|
+
# Sort this column by the ordering of other columns.
|
|
1404
|
+
def sort_by(self, by: IntoExpr | Iterable[IntoExpr], *more_by, descending: bool | Sequence[bool]=False, nulls_last: bool | Sequence[bool]=False, multithreaded: bool=True, maintain_order: bool=False) -> Expr: ...
|
|
1405
|
+
|
|
1406
|
+
# Compute the square root of the elements.
|
|
1407
|
+
def sqrt(self, ) -> Expr: ...
|
|
1408
|
+
|
|
1409
|
+
def std(self, ddof=1) -> Any: ...
|
|
1410
|
+
|
|
1411
|
+
# Method equivalent of subtraction operator `expr - other`.
|
|
1412
|
+
def sub(self, other: Any) -> Expr: ...
|
|
1413
|
+
|
|
1414
|
+
def sum(self, ) -> 'Column': ...
|
|
1415
|
+
|
|
1416
|
+
# Get the last `n` rows.
|
|
1417
|
+
def tail(self, n: int | Expr=10) -> Expr: ...
|
|
1418
|
+
|
|
1419
|
+
# Compute the element-wise value for the tangent.
|
|
1420
|
+
def tan(self, ) -> Expr: ...
|
|
1421
|
+
|
|
1422
|
+
# Compute the element-wise value for the hyperbolic tangent.
|
|
1423
|
+
def tanh(self, ) -> Expr: ...
|
|
1424
|
+
|
|
1425
|
+
# Cast to physical representation of the logical dtype.
|
|
1426
|
+
def to_physical(self, ) -> Expr: ...
|
|
1427
|
+
|
|
1428
|
+
# Convert Column state back to a SelectInput schema object.
|
|
1429
|
+
def to_select_input(self, ) -> transform_schema.SelectInput: ...
|
|
1430
|
+
|
|
1431
|
+
# Return the `k` largest elements.
|
|
1432
|
+
def top_k(self, k: int | IntoExprColumn=5) -> Expr: ...
|
|
1433
|
+
|
|
1434
|
+
# Return the elements corresponding to the `k` largest elements of the `by` column(s).
|
|
1435
|
+
def top_k_by(self, by: IntoExpr | Iterable[IntoExpr], k: int | IntoExprColumn=5, reverse: bool | Sequence[bool]=False) -> Expr: ...
|
|
1436
|
+
|
|
1437
|
+
# Method equivalent of float division operator `expr / other`.
|
|
1438
|
+
def truediv(self, other: Any) -> Expr: ...
|
|
1439
|
+
|
|
1440
|
+
# Get unique values of this expression.
|
|
1441
|
+
def unique(self, maintain_order: bool=False) -> Expr: ...
|
|
1442
|
+
|
|
1443
|
+
# Return a count of the unique values in the order of appearance.
|
|
1444
|
+
def unique_counts(self, ) -> Expr: ...
|
|
1445
|
+
|
|
1446
|
+
# Calculate the upper bound.
|
|
1447
|
+
def upper_bound(self, ) -> Expr: ...
|
|
1448
|
+
|
|
1449
|
+
# Count the occurrences of unique values.
|
|
1450
|
+
def value_counts(self, sort: bool=False, parallel: bool=False, name: str | None=None, normalize: bool=False) -> Expr: ...
|
|
1451
|
+
|
|
1452
|
+
def var(self, ddof=1) -> Any: ...
|
|
1453
|
+
|
|
1454
|
+
# Filter a single column.
|
|
1455
|
+
def where(self, predicate: Expr) -> Expr: ...
|
|
1456
|
+
|
|
1457
|
+
# Method equivalent of bitwise exclusive-or operator `expr ^ other`.
|
|
1458
|
+
def xor(self, other: Any) -> Expr: ...
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
class When(Expr):
|
|
1462
|
+
dt: DateTimeMethods
|
|
1463
|
+
is_simple: bool
|
|
1464
|
+
list: ExprListNameSpace
|
|
1465
|
+
name: ExprNameNameSpace
|
|
1466
|
+
str: StringMethods
|
|
1467
|
+
__module__: Any
|
|
1468
|
+
__doc__: Any
|
|
1469
|
+
__annotations__: Any
|
|
1470
|
+
|
|
1471
|
+
def __add__(self, other) -> 'When': ...
|
|
1472
|
+
|
|
1473
|
+
def __and__(self, other) -> 'Expr': ...
|
|
1474
|
+
|
|
1475
|
+
def __eq__(self, other) -> 'When': ...
|
|
1476
|
+
|
|
1477
|
+
def __floordiv__(self, other) -> 'When': ...
|
|
1478
|
+
|
|
1479
|
+
def __ge__(self, other) -> 'Expr': ...
|
|
1480
|
+
|
|
1481
|
+
def __gt__(self, other) -> 'When': ...
|
|
1482
|
+
|
|
1483
|
+
# Initialize a When expression with a condition.
|
|
1484
|
+
def __init__(self, condition) -> Any: ...
|
|
1485
|
+
|
|
1486
|
+
def __invert__(self, ) -> 'Expr': ...
|
|
1487
|
+
|
|
1488
|
+
def __le__(self, other) -> 'Expr': ...
|
|
1489
|
+
|
|
1490
|
+
def __lt__(self, other) -> 'When': ...
|
|
1491
|
+
|
|
1492
|
+
def __mod__(self, other) -> 'When': ...
|
|
1493
|
+
|
|
1494
|
+
def __mul__(self, other) -> 'When': ...
|
|
1495
|
+
|
|
1496
|
+
def __ne__(self, other) -> 'When': ...
|
|
1497
|
+
|
|
1498
|
+
def __neg__(self, ) -> 'Expr': ...
|
|
1499
|
+
|
|
1500
|
+
def __or__(self, other) -> 'Expr': ...
|
|
1501
|
+
|
|
1502
|
+
def __pow__(self, exponent) -> 'When': ...
|
|
1503
|
+
|
|
1504
|
+
def __radd__(self, other) -> Any: ...
|
|
1505
|
+
|
|
1506
|
+
def __repr__(self, ) -> str: ...
|
|
1507
|
+
|
|
1508
|
+
def __rfloordiv__(self, other) -> Any: ...
|
|
1509
|
+
|
|
1510
|
+
def __rmod__(self, other) -> Any: ...
|
|
1511
|
+
|
|
1512
|
+
def __rmul__(self, other) -> Any: ...
|
|
1513
|
+
|
|
1514
|
+
def __rpow__(self, other) -> Any: ...
|
|
1515
|
+
|
|
1516
|
+
def __rsub__(self, other) -> Any: ...
|
|
1517
|
+
|
|
1518
|
+
def __rtruediv__(self, other) -> Any: ...
|
|
1519
|
+
|
|
1520
|
+
def __sub__(self, other) -> 'When': ...
|
|
1521
|
+
|
|
1522
|
+
def __truediv__(self, other) -> 'When': ...
|
|
1523
|
+
|
|
1524
|
+
# Creates a new Expr for binary operations.
|
|
1525
|
+
def _create_binary_op_expr(self, op_symbol: str, other: Any, result_expr: Optional[pl.Expr]) -> 'Expr': ...
|
|
1526
|
+
|
|
1527
|
+
# Creates a new Expr instance, appending method call to repr string.
|
|
1528
|
+
def _create_next_expr(self, *args, method_name: str, result_expr: Optional[pl.Expr], convertable_to_code: bool=None, is_complex: bool, _function_sources: Optional[List[str]]=None, **kwargs) -> 'Expr': ...
|
|
1529
|
+
|
|
1530
|
+
# Extract expression and representation from a value.
|
|
1531
|
+
def _get_expr_and_repr(self, value) -> Any: ...
|
|
1532
|
+
|
|
1533
|
+
# Helper to get appropriate string representation for an expression
|
|
1534
|
+
def _get_expr_repr(self, expr) -> Any: ...
|
|
1535
|
+
|
|
1536
|
+
# Compute absolute values.
|
|
1537
|
+
def abs(self, ) -> Expr: ...
|
|
1538
|
+
|
|
1539
|
+
# Method equivalent of addition operator `expr + other`.
|
|
1540
|
+
def add(self, other: Any) -> Expr: ...
|
|
1541
|
+
|
|
1542
|
+
# Get the group indexes of the group by operation.
|
|
1543
|
+
def agg_groups(self, ) -> Expr: ...
|
|
1544
|
+
|
|
1545
|
+
# Rename the expression result.
|
|
1546
|
+
def alias(self, name) -> 'When': ...
|
|
1547
|
+
|
|
1548
|
+
# Return whether all values in the column are `True`.
|
|
1549
|
+
def all(self, ignore_nulls: bool=True) -> Expr: ...
|
|
1550
|
+
|
|
1551
|
+
# Method equivalent of bitwise "and" operator `expr & other & ...`.
|
|
1552
|
+
def and_(self, *others) -> Expr: ...
|
|
1553
|
+
|
|
1554
|
+
# Return whether any of the values in the column are `True`.
|
|
1555
|
+
def any(self, ignore_nulls: bool=True) -> Expr: ...
|
|
1556
|
+
|
|
1557
|
+
# Append expressions.
|
|
1558
|
+
def append(self, other: IntoExpr, upcast: bool=True) -> Expr: ...
|
|
1559
|
+
|
|
1560
|
+
# Approximate count of unique values.
|
|
1561
|
+
def approx_n_unique(self, ) -> Expr: ...
|
|
1562
|
+
|
|
1563
|
+
# Compute the element-wise value for the inverse cosine.
|
|
1564
|
+
def arccos(self, ) -> Expr: ...
|
|
1565
|
+
|
|
1566
|
+
# Compute the element-wise value for the inverse hyperbolic cosine.
|
|
1567
|
+
def arccosh(self, ) -> Expr: ...
|
|
1568
|
+
|
|
1569
|
+
# Compute the element-wise value for the inverse sine.
|
|
1570
|
+
def arcsin(self, ) -> Expr: ...
|
|
1571
|
+
|
|
1572
|
+
# Compute the element-wise value for the inverse hyperbolic sine.
|
|
1573
|
+
def arcsinh(self, ) -> Expr: ...
|
|
1574
|
+
|
|
1575
|
+
# Compute the element-wise value for the inverse tangent.
|
|
1576
|
+
def arctan(self, ) -> Expr: ...
|
|
1577
|
+
|
|
1578
|
+
# Compute the element-wise value for the inverse hyperbolic tangent.
|
|
1579
|
+
def arctanh(self, ) -> Expr: ...
|
|
1580
|
+
|
|
1581
|
+
# Get the index of the maximal value.
|
|
1582
|
+
def arg_max(self, ) -> Expr: ...
|
|
1583
|
+
|
|
1584
|
+
# Get the index of the minimal value.
|
|
1585
|
+
def arg_min(self, ) -> Expr: ...
|
|
1586
|
+
|
|
1587
|
+
def arg_sort(self, descending: bool=False, nulls_last: bool=False) -> 'Expr': ...
|
|
1588
|
+
|
|
1589
|
+
# Return indices where expression evaluates `True`.
|
|
1590
|
+
def arg_true(self, ) -> Expr: ...
|
|
1591
|
+
|
|
1592
|
+
def arg_unique(self, ) -> 'Expr': ...
|
|
1593
|
+
|
|
1594
|
+
# Fill missing values with the next non-null value.
|
|
1595
|
+
def backward_fill(self, limit: int | None=None) -> Expr: ...
|
|
1596
|
+
|
|
1597
|
+
# Perform an aggregation of bitwise ANDs.
|
|
1598
|
+
def bitwise_and(self, ) -> Expr: ...
|
|
1599
|
+
|
|
1600
|
+
# Evaluate the number of set bits.
|
|
1601
|
+
def bitwise_count_ones(self, ) -> Expr: ...
|
|
1602
|
+
|
|
1603
|
+
# Evaluate the number of unset bits.
|
|
1604
|
+
def bitwise_count_zeros(self, ) -> Expr: ...
|
|
1605
|
+
|
|
1606
|
+
# Evaluate the number most-significant set bits before seeing an unset bit.
|
|
1607
|
+
def bitwise_leading_ones(self, ) -> Expr: ...
|
|
1608
|
+
|
|
1609
|
+
# Evaluate the number most-significant unset bits before seeing a set bit.
|
|
1610
|
+
def bitwise_leading_zeros(self, ) -> Expr: ...
|
|
1611
|
+
|
|
1612
|
+
# Perform an aggregation of bitwise ORs.
|
|
1613
|
+
def bitwise_or(self, ) -> Expr: ...
|
|
1614
|
+
|
|
1615
|
+
# Evaluate the number least-significant set bits before seeing an unset bit.
|
|
1616
|
+
def bitwise_trailing_ones(self, ) -> Expr: ...
|
|
1617
|
+
|
|
1618
|
+
# Evaluate the number least-significant unset bits before seeing a set bit.
|
|
1619
|
+
def bitwise_trailing_zeros(self, ) -> Expr: ...
|
|
1620
|
+
|
|
1621
|
+
# Perform an aggregation of bitwise XORs.
|
|
1622
|
+
def bitwise_xor(self, ) -> Expr: ...
|
|
1623
|
+
|
|
1624
|
+
# Return the `k` smallest elements.
|
|
1625
|
+
def bottom_k(self, k: int | IntoExprColumn=5) -> Expr: ...
|
|
1626
|
+
|
|
1627
|
+
# Return the elements corresponding to the `k` smallest elements of the `by` column(s).
|
|
1628
|
+
def bottom_k_by(self, by: IntoExpr | Iterable[IntoExpr], k: int | IntoExprColumn=5, reverse: bool | Sequence[bool]=False) -> Expr: ...
|
|
1629
|
+
|
|
1630
|
+
# Casts the Expr to a specified data type.
|
|
1631
|
+
def cast(self, dtype: Union[pl.DataType, str, pl.datatypes.classes.DataTypeClass], strict=True) -> 'When': ...
|
|
1632
|
+
|
|
1633
|
+
# Compute the cube root of the elements.
|
|
1634
|
+
def cbrt(self, ) -> Expr: ...
|
|
1635
|
+
|
|
1636
|
+
# Rounds up to the nearest integer value.
|
|
1637
|
+
def ceil(self, ) -> Expr: ...
|
|
1638
|
+
|
|
1639
|
+
# Set values outside the given boundaries to the boundary value.
|
|
1640
|
+
def clip(self, lower_bound: NumericLiteral | TemporalLiteral | IntoExprColumn | None=None, upper_bound: NumericLiteral | TemporalLiteral | IntoExprColumn | None=None) -> Expr: ...
|
|
1641
|
+
|
|
1642
|
+
# Compute the element-wise value for the cosine.
|
|
1643
|
+
def cos(self, ) -> Expr: ...
|
|
1644
|
+
|
|
1645
|
+
# Compute the element-wise value for the hyperbolic cosine.
|
|
1646
|
+
def cosh(self, ) -> Expr: ...
|
|
1647
|
+
|
|
1648
|
+
# Compute the element-wise value for the cotangent.
|
|
1649
|
+
def cot(self, ) -> Expr: ...
|
|
1650
|
+
|
|
1651
|
+
def count(self, ) -> 'When': ...
|
|
1652
|
+
|
|
1653
|
+
# Return the cumulative count of the non-null values in the column.
|
|
1654
|
+
def cum_count(self, reverse: bool=False) -> 'Expr': ...
|
|
1655
|
+
|
|
1656
|
+
# Get an array with the cumulative max computed at every element.
|
|
1657
|
+
def cum_max(self, reverse: bool=False) -> Expr: ...
|
|
1658
|
+
|
|
1659
|
+
# Get an array with the cumulative min computed at every element.
|
|
1660
|
+
def cum_min(self, reverse: bool=False) -> Expr: ...
|
|
1661
|
+
|
|
1662
|
+
# Get an array with the cumulative product computed at every element.
|
|
1663
|
+
def cum_prod(self, reverse: bool=False) -> Expr: ...
|
|
1664
|
+
|
|
1665
|
+
# Get an array with the cumulative sum computed at every element.
|
|
1666
|
+
def cum_sum(self, reverse: bool=False) -> Expr: ...
|
|
1667
|
+
|
|
1668
|
+
# Run an expression over a sliding window that increases `1` slot every iteration.
|
|
1669
|
+
def cumulative_eval(self, expr: Expr, min_samples: int=1, parallel: bool=False) -> Expr: ...
|
|
1670
|
+
|
|
1671
|
+
# Bin continuous values into discrete categories.
|
|
1672
|
+
def cut(self, breaks: Sequence[float], labels: Sequence[str] | None=None, left_closed: bool=False, include_breaks: bool=False) -> Expr: ...
|
|
1673
|
+
|
|
1674
|
+
# Convert from radians to degrees.
|
|
1675
|
+
def degrees(self, ) -> Expr: ...
|
|
1676
|
+
|
|
1677
|
+
# Read a serialized expression from a file.
|
|
1678
|
+
def deserialize(self, source: str | Path | IOBase | bytes, format: SerializationFormat='binary') -> Expr: ...
|
|
1679
|
+
|
|
1680
|
+
# Calculate the first discrete difference between shifted items.
|
|
1681
|
+
def diff(self, n: int=1, null_behavior: NullBehavior='ignore') -> Expr: ...
|
|
1682
|
+
|
|
1683
|
+
# Compute the dot/inner product between two Expressions.
|
|
1684
|
+
def dot(self, other: Expr | str) -> Expr: ...
|
|
1685
|
+
|
|
1686
|
+
# Drop all floating point NaN values.
|
|
1687
|
+
def drop_nans(self, ) -> Expr: ...
|
|
1688
|
+
|
|
1689
|
+
# Drop all null values.
|
|
1690
|
+
def drop_nulls(self, ) -> Expr: ...
|
|
1691
|
+
|
|
1692
|
+
# Computes the entropy.
|
|
1693
|
+
def entropy(self, base: float=2.718281828459045, normalize: bool=True) -> Expr: ...
|
|
1694
|
+
|
|
1695
|
+
# Method equivalent of equality operator `expr == other`.
|
|
1696
|
+
def eq(self, other: Any) -> Expr: ...
|
|
1697
|
+
|
|
1698
|
+
# Method equivalent of equality operator `expr == other` where `None == None`.
|
|
1699
|
+
def eq_missing(self, other: Any) -> Expr: ...
|
|
1700
|
+
|
|
1701
|
+
# Compute exponentially-weighted moving average.
|
|
1702
|
+
def ewm_mean(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
1703
|
+
|
|
1704
|
+
# Compute time-based exponentially weighted moving average.
|
|
1705
|
+
def ewm_mean_by(self, by: str | IntoExpr, half_life: str | timedelta) -> Expr: ...
|
|
1706
|
+
|
|
1707
|
+
# Compute exponentially-weighted moving standard deviation.
|
|
1708
|
+
def ewm_std(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, bias: bool=False, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
1709
|
+
|
|
1710
|
+
# Compute exponentially-weighted moving variance.
|
|
1711
|
+
def ewm_var(self, com: float | None=None, span: float | None=None, half_life: float | None=None, alpha: float | None=None, adjust: bool=True, bias: bool=False, min_samples: int=1, ignore_nulls: bool=False) -> Expr: ...
|
|
1712
|
+
|
|
1713
|
+
# Exclude columns from a multi-column expression.
|
|
1714
|
+
def exclude(self, columns: str | PolarsDataType | Collection[str] | Collection[PolarsDataType], *more_columns) -> Expr: ...
|
|
1715
|
+
|
|
1716
|
+
# Compute the exponential, element-wise.
|
|
1717
|
+
def exp(self, ) -> Expr: ...
|
|
1718
|
+
|
|
1719
|
+
def explode(self, ) -> Any: ...
|
|
1720
|
+
|
|
1721
|
+
# Extremely fast method for extending the Series with 'n' copies of a value.
|
|
1722
|
+
def extend_constant(self, value: IntoExpr, n: int | IntoExprColumn) -> Expr: ...
|
|
1723
|
+
|
|
1724
|
+
def fill_nan(self, value) -> 'When': ...
|
|
1725
|
+
|
|
1726
|
+
def fill_null(self, value) -> 'When': ...
|
|
1727
|
+
|
|
1728
|
+
# Filter expression
|
|
1729
|
+
def filter(self, *predicates, **constraints) -> 'Expr': ...
|
|
1730
|
+
|
|
1731
|
+
def first(self, ) -> 'When': ...
|
|
1732
|
+
|
|
1733
|
+
# Flatten a list or string column.
|
|
1734
|
+
def flatten(self, ) -> Expr: ...
|
|
1735
|
+
|
|
1736
|
+
# Rounds down to the nearest integer value.
|
|
1737
|
+
def floor(self, ) -> Expr: ...
|
|
1738
|
+
|
|
1739
|
+
# Method equivalent of integer division operator `expr // other`.
|
|
1740
|
+
def floordiv(self, other: Any) -> Expr: ...
|
|
1741
|
+
|
|
1742
|
+
# Fill missing values with the last non-null value.
|
|
1743
|
+
def forward_fill(self, limit: int | None=None) -> Expr: ...
|
|
1744
|
+
|
|
1745
|
+
# Read an expression from a JSON encoded string to construct an Expression.
|
|
1746
|
+
def from_json(self, value: str) -> Expr: ...
|
|
1747
|
+
|
|
1748
|
+
# Take values by index.
|
|
1749
|
+
def gather(self, indices: int | Sequence[int] | IntoExpr | Series | np.ndarray[Any, Any]) -> Expr: ...
|
|
1750
|
+
|
|
1751
|
+
# Take every nth value in the Series and return as a new Series.
|
|
1752
|
+
def gather_every(self, n: int, offset: int=0) -> Expr: ...
|
|
1753
|
+
|
|
1754
|
+
# Method equivalent of "greater than or equal" operator `expr >= other`.
|
|
1755
|
+
def ge(self, other: Any) -> Expr: ...
|
|
1756
|
+
|
|
1757
|
+
# Return a single value by index.
|
|
1758
|
+
def get(self, index: int | Expr) -> Expr: ...
|
|
1759
|
+
|
|
1760
|
+
# Get the Polars code representation of this expression, including any function definitions.
|
|
1761
|
+
def get_polars_code(self, ) -> str: ...
|
|
1762
|
+
|
|
1763
|
+
# Method equivalent of "greater than" operator `expr > other`.
|
|
1764
|
+
def gt(self, other: Any) -> Expr: ...
|
|
1765
|
+
|
|
1766
|
+
# Check whether the expression contains one or more null values.
|
|
1767
|
+
def has_nulls(self, ) -> Expr: ...
|
|
1768
|
+
|
|
1769
|
+
# Hash the elements in the selection.
|
|
1770
|
+
def hash(self, seed: int=0, seed_1: int | None=None, seed_2: int | None=None, seed_3: int | None=None) -> Expr: ...
|
|
1771
|
+
|
|
1772
|
+
# Get the first `n` rows.
|
|
1773
|
+
def head(self, n: int | Expr=10) -> Expr: ...
|
|
1774
|
+
|
|
1775
|
+
# Bin values into buckets and count their occurrences.
|
|
1776
|
+
def hist(self, bins: IntoExpr | None=None, bin_count: int | None=None, include_category: bool=False, include_breakpoint: bool=False) -> Expr: ...
|
|
1777
|
+
|
|
1778
|
+
def implode(self, ) -> Any: ...
|
|
1779
|
+
|
|
1780
|
+
# Get the index of the first occurrence of a value, or ``None`` if it's not found.
|
|
1781
|
+
def index_of(self, element: IntoExpr) -> Expr: ...
|
|
1782
|
+
|
|
1783
|
+
# Print the value that this expression evaluates to and pass on the value.
|
|
1784
|
+
def inspect(self, fmt: str='{}') -> Expr: ...
|
|
1785
|
+
|
|
1786
|
+
# Fill null values using interpolation.
|
|
1787
|
+
def interpolate(self, method: InterpolationMethod='linear') -> Expr: ...
|
|
1788
|
+
|
|
1789
|
+
# Fill null values using interpolation based on another column.
|
|
1790
|
+
def interpolate_by(self, by: IntoExpr) -> Expr: ...
|
|
1791
|
+
|
|
1792
|
+
# Check if this expression is between the given lower and upper bounds.
|
|
1793
|
+
def is_between(self, lower_bound: IntoExpr, upper_bound: IntoExpr, closed: ClosedInterval='both') -> Expr: ...
|
|
1794
|
+
|
|
1795
|
+
# Return a boolean mask indicating duplicated values.
|
|
1796
|
+
def is_duplicated(self, ) -> Expr: ...
|
|
1797
|
+
|
|
1798
|
+
# Returns a boolean Series indicating which values are finite.
|
|
1799
|
+
def is_finite(self, ) -> Expr: ...
|
|
1800
|
+
|
|
1801
|
+
# Return a boolean mask indicating the first occurrence of each distinct value.
|
|
1802
|
+
def is_first_distinct(self, ) -> Expr: ...
|
|
1803
|
+
|
|
1804
|
+
def is_in(self, values) -> Any: ...
|
|
1805
|
+
|
|
1806
|
+
# Returns a boolean Series indicating which values are infinite.
|
|
1807
|
+
def is_infinite(self, ) -> Expr: ...
|
|
1808
|
+
|
|
1809
|
+
# Return a boolean mask indicating the last occurrence of each distinct value.
|
|
1810
|
+
def is_last_distinct(self, ) -> Expr: ...
|
|
1811
|
+
|
|
1812
|
+
# Returns a boolean Series indicating which values are NaN.
|
|
1813
|
+
def is_nan(self, ) -> Expr: ...
|
|
1814
|
+
|
|
1815
|
+
# Returns a boolean Series indicating which values are not NaN.
|
|
1816
|
+
def is_not_nan(self, ) -> Expr: ...
|
|
1817
|
+
|
|
1818
|
+
def is_not_null(self, ) -> 'When': ...
|
|
1819
|
+
|
|
1820
|
+
def is_null(self, ) -> 'When': ...
|
|
1821
|
+
|
|
1822
|
+
# Get mask of unique values.
|
|
1823
|
+
def is_unique(self, ) -> Expr: ...
|
|
1824
|
+
|
|
1825
|
+
# Compute the kurtosis (Fisher or Pearson) of a dataset.
|
|
1826
|
+
def kurtosis(self, fisher: bool=True, bias: bool=True) -> Expr: ...
|
|
1827
|
+
|
|
1828
|
+
def last(self, ) -> 'When': ...
|
|
1829
|
+
|
|
1830
|
+
# Method equivalent of "less than or equal" operator `expr <= other`.
|
|
1831
|
+
def le(self, other: Any) -> Expr: ...
|
|
1832
|
+
|
|
1833
|
+
# Return the number of elements in the column.
|
|
1834
|
+
def len(self, ) -> Expr: ...
|
|
1835
|
+
|
|
1836
|
+
# Get the first `n` rows (alias for :func:`Expr.head`).
|
|
1837
|
+
def limit(self, n: int | Expr=10) -> Expr: ...
|
|
1838
|
+
|
|
1839
|
+
# Compute the logarithm to a given base.
|
|
1840
|
+
def log(self, base: float=2.718281828459045) -> Expr: ...
|
|
1841
|
+
|
|
1842
|
+
# Compute the base 10 logarithm of the input array, element-wise.
|
|
1843
|
+
def log10(self, ) -> Expr: ...
|
|
1844
|
+
|
|
1845
|
+
# Compute the natural logarithm of each element plus one.
|
|
1846
|
+
def log1p(self, ) -> Expr: ...
|
|
1847
|
+
|
|
1848
|
+
# Calculate the lower bound.
|
|
1849
|
+
def lower_bound(self, ) -> Expr: ...
|
|
1850
|
+
|
|
1851
|
+
# Method equivalent of "less than" operator `expr < other`.
|
|
1852
|
+
def lt(self, other: Any) -> Expr: ...
|
|
1853
|
+
|
|
1854
|
+
# Apply a custom python function to a whole Series or sequence of Series.
|
|
1855
|
+
def map_batches(self, function: Callable[[Series], Series | Any], return_dtype: PolarsDataType | None=None, agg_list: bool=False, is_elementwise: bool=False, returns_scalar: bool=False) -> Expr: ...
|
|
1856
|
+
|
|
1857
|
+
# Map a custom/user-defined function (UDF) to each element of a column.
|
|
1858
|
+
def map_elements(self, function: Callable[[Any], Any], return_dtype: PolarsDataType | None=None, skip_nulls: bool=True, pass_name: bool=False, strategy: MapElementsStrategy='thread_local', returns_scalar: bool=False) -> Expr: ...
|
|
1859
|
+
|
|
1860
|
+
def max(self, ) -> 'When': ...
|
|
1861
|
+
|
|
1862
|
+
def mean(self, ) -> 'When': ...
|
|
1863
|
+
|
|
1864
|
+
def median(self, ) -> Any: ...
|
|
1865
|
+
|
|
1866
|
+
def min(self, ) -> 'When': ...
|
|
1867
|
+
|
|
1868
|
+
# Method equivalent of modulus operator `expr % other`.
|
|
1869
|
+
def mod(self, other: Any) -> Expr: ...
|
|
1870
|
+
|
|
1871
|
+
# Compute the most occurring value(s).
|
|
1872
|
+
def mode(self, ) -> Expr: ...
|
|
1873
|
+
|
|
1874
|
+
# Method equivalent of multiplication operator `expr * other`.
|
|
1875
|
+
def mul(self, other: Any) -> Expr: ...
|
|
1876
|
+
|
|
1877
|
+
def n_unique(self, ) -> Any: ...
|
|
1878
|
+
|
|
1879
|
+
# Get maximum value, but propagate/poison encountered NaN values.
|
|
1880
|
+
def nan_max(self, ) -> Expr: ...
|
|
1881
|
+
|
|
1882
|
+
# Get minimum value, but propagate/poison encountered NaN values.
|
|
1883
|
+
def nan_min(self, ) -> Expr: ...
|
|
1884
|
+
|
|
1885
|
+
# Method equivalent of inequality operator `expr != other`.
|
|
1886
|
+
def ne(self, other: Any) -> Expr: ...
|
|
1887
|
+
|
|
1888
|
+
# Method equivalent of equality operator `expr != other` where `None == None`.
|
|
1889
|
+
def ne_missing(self, other: Any) -> Expr: ...
|
|
1890
|
+
|
|
1891
|
+
# Method equivalent of unary minus operator `-expr`.
|
|
1892
|
+
def neg(self, ) -> Expr: ...
|
|
1893
|
+
|
|
1894
|
+
# Negate a boolean expression.
|
|
1895
|
+
def not_(self, ) -> Expr: ...
|
|
1896
|
+
|
|
1897
|
+
# Count null values.
|
|
1898
|
+
def null_count(self, ) -> Expr: ...
|
|
1899
|
+
|
|
1900
|
+
# Method equivalent of bitwise "or" operator `expr | other | ...`.
|
|
1901
|
+
def or_(self, *others) -> Expr: ...
|
|
1902
|
+
|
|
1903
|
+
# Set the value to use when no condition is True.
|
|
1904
|
+
def otherwise(self, value) -> Any: ...
|
|
1905
|
+
|
|
1906
|
+
# Compute expressions over the given groups.
|
|
1907
|
+
def over(self, partition_by: ExprStrOrList, *more_exprs, order_by: Optional[ExprStrOrList]=None, descending: bool=False, nulls_last: bool=False, mapping_strategy: Literal['group_to_rows', 'join', 'explode']='group_to_rows') -> 'Expr': ...
|
|
1908
|
+
|
|
1909
|
+
# Computes percentage change between values.
|
|
1910
|
+
def pct_change(self, n: int | IntoExprColumn=1) -> Expr: ...
|
|
1911
|
+
|
|
1912
|
+
# Get a boolean mask of the local maximum peaks.
|
|
1913
|
+
def peak_max(self, ) -> Expr: ...
|
|
1914
|
+
|
|
1915
|
+
# Get a boolean mask of the local minimum peaks.
|
|
1916
|
+
def peak_min(self, ) -> Expr: ...
|
|
1917
|
+
|
|
1918
|
+
# Offers a structured way to apply a sequence of user-defined functions (UDFs).
|
|
1919
|
+
def pipe(self, function: Callable[Concatenate[Expr, P], T], *args, **kwargs) -> T: ...
|
|
1920
|
+
|
|
1921
|
+
# Method equivalent of exponentiation operator `expr ** exponent`.
|
|
1922
|
+
def pow(self, exponent: IntoExprColumn | int | float) -> Expr: ...
|
|
1923
|
+
|
|
1924
|
+
# Compute the product of an expression.
|
|
1925
|
+
def product(self, ) -> Expr: ...
|
|
1926
|
+
|
|
1927
|
+
# Bin continuous values into discrete categories based on their quantiles.
|
|
1928
|
+
def qcut(self, quantiles: Sequence[float] | int, labels: Sequence[str] | None=None, left_closed: bool=False, allow_duplicates: bool=False, include_breaks: bool=False) -> Expr: ...
|
|
1929
|
+
|
|
1930
|
+
# Get quantile value.
|
|
1931
|
+
def quantile(self, quantile: float | Expr, interpolation: RollingInterpolationMethod='nearest') -> Expr: ...
|
|
1932
|
+
|
|
1933
|
+
# Convert from degrees to radians.
|
|
1934
|
+
def radians(self, ) -> Expr: ...
|
|
1935
|
+
|
|
1936
|
+
# Assign ranks to data, dealing with ties appropriately.
|
|
1937
|
+
def rank(self, method: RankMethod='average', descending: bool=False, seed: int | None=None) -> Expr: ...
|
|
1938
|
+
|
|
1939
|
+
# Create a single chunk of memory for this Series.
|
|
1940
|
+
def rechunk(self, ) -> Expr: ...
|
|
1941
|
+
|
|
1942
|
+
# Register a plugin function.
|
|
1943
|
+
def register_plugin(self, lib: str, symbol: str, args: list[IntoExpr] | None=None, kwargs: dict[Any, Any] | None=None, is_elementwise: bool=False, input_wildcard_expansion: bool=False, returns_scalar: bool=False, cast_to_supertypes: bool=False, pass_name_to_apply: bool=False, changes_length: bool=False) -> Expr: ...
|
|
1944
|
+
|
|
1945
|
+
# Reinterpret the underlying bits as a signed/unsigned integer.
|
|
1946
|
+
def reinterpret(self, signed: bool=True) -> Expr: ...
|
|
1947
|
+
|
|
1948
|
+
# Repeat the elements in this Series as specified in the given expression.
|
|
1949
|
+
def repeat_by(self, by: pl.Series | Expr | str | int) -> Expr: ...
|
|
1950
|
+
|
|
1951
|
+
# Replace the given values by different values of the same data type.
|
|
1952
|
+
def replace(self, old: IntoExpr | Sequence[Any] | Mapping[Any, Any], new: IntoExpr | Sequence[Any], default: IntoExpr, return_dtype: PolarsDataType | None=None) -> Expr: ...
|
|
1953
|
+
|
|
1954
|
+
# Replace all values by different values.
|
|
1955
|
+
def replace_strict(self, old: IntoExpr | Sequence[Any] | Mapping[Any, Any], new: IntoExpr | Sequence[Any], default: IntoExpr, return_dtype: PolarsDataType | None=None) -> Expr: ...
|
|
1956
|
+
|
|
1957
|
+
# Reshape this Expr to a flat column or an Array column.
|
|
1958
|
+
def reshape(self, dimensions: tuple[int, ...]) -> Expr: ...
|
|
1959
|
+
|
|
1960
|
+
# Reverse the selection.
|
|
1961
|
+
def reverse(self, ) -> Expr: ...
|
|
1962
|
+
|
|
1963
|
+
# Compress the column data using run-length encoding.
|
|
1964
|
+
def rle(self, ) -> Expr: ...
|
|
1965
|
+
|
|
1966
|
+
# Get a distinct integer ID for each run of identical values.
|
|
1967
|
+
def rle_id(self, ) -> Expr: ...
|
|
1968
|
+
|
|
1969
|
+
# Create rolling groups based on a temporal or integer column.
|
|
1970
|
+
def rolling(self, index_column: str, period: str | timedelta, offset: str | timedelta | None=None, closed: ClosedInterval='right') -> Expr: ...
|
|
1971
|
+
|
|
1972
|
+
# Compute a custom rolling window function.
|
|
1973
|
+
def rolling_map(self, function: Callable[[Series], Any], window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1974
|
+
|
|
1975
|
+
# Apply a rolling max (moving max) over the values in this array.
|
|
1976
|
+
def rolling_max(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1977
|
+
|
|
1978
|
+
# Apply a rolling max based on another column.
|
|
1979
|
+
def rolling_max_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1980
|
+
|
|
1981
|
+
# Apply a rolling mean (moving mean) over the values in this array.
|
|
1982
|
+
def rolling_mean(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1983
|
+
|
|
1984
|
+
# Apply a rolling mean based on another column.
|
|
1985
|
+
def rolling_mean_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1986
|
+
|
|
1987
|
+
# Compute a rolling median.
|
|
1988
|
+
def rolling_median(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1989
|
+
|
|
1990
|
+
# Compute a rolling median based on another column.
|
|
1991
|
+
def rolling_median_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1992
|
+
|
|
1993
|
+
# Apply a rolling min (moving min) over the values in this array.
|
|
1994
|
+
def rolling_min(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
1995
|
+
|
|
1996
|
+
# Apply a rolling min based on another column.
|
|
1997
|
+
def rolling_min_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
1998
|
+
|
|
1999
|
+
# Compute a rolling quantile.
|
|
2000
|
+
def rolling_quantile(self, quantile: float, interpolation: RollingInterpolationMethod='nearest', window_size: int=2, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
2001
|
+
|
|
2002
|
+
# Compute a rolling quantile based on another column.
|
|
2003
|
+
def rolling_quantile_by(self, by: IntoExpr, window_size: timedelta | str, quantile: float, interpolation: RollingInterpolationMethod='nearest', min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
2004
|
+
|
|
2005
|
+
# Compute a rolling skew.
|
|
2006
|
+
def rolling_skew(self, window_size: int, bias: bool=True) -> Expr: ...
|
|
2007
|
+
|
|
2008
|
+
# Compute a rolling standard deviation.
|
|
2009
|
+
def rolling_std(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False, ddof: int=1) -> Expr: ...
|
|
2010
|
+
|
|
2011
|
+
# Compute a rolling standard deviation based on another column.
|
|
2012
|
+
def rolling_std_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right', ddof: int=1) -> Expr: ...
|
|
2013
|
+
|
|
2014
|
+
# Apply a rolling sum (moving sum) over the values in this array.
|
|
2015
|
+
def rolling_sum(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False) -> Expr: ...
|
|
2016
|
+
|
|
2017
|
+
# Apply a rolling sum based on another column.
|
|
2018
|
+
def rolling_sum_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right') -> Expr: ...
|
|
2019
|
+
|
|
2020
|
+
# Compute a rolling variance.
|
|
2021
|
+
def rolling_var(self, window_size: int, weights: list[float] | None=None, min_samples: int | None=None, center: bool=False, ddof: int=1) -> Expr: ...
|
|
2022
|
+
|
|
2023
|
+
# Compute a rolling variance based on another column.
|
|
2024
|
+
def rolling_var_by(self, by: IntoExpr, window_size: timedelta | str, min_samples: int=1, closed: ClosedInterval='right', ddof: int=1) -> Expr: ...
|
|
2025
|
+
|
|
2026
|
+
# Round underlying floating point data by `decimals` digits.
|
|
2027
|
+
def round(self, decimals: int=0) -> Expr: ...
|
|
2028
|
+
|
|
2029
|
+
# Round to a number of significant figures.
|
|
2030
|
+
def round_sig_figs(self, digits: int) -> Expr: ...
|
|
2031
|
+
|
|
2032
|
+
# Sample from this expression.
|
|
2033
|
+
def sample(self, n: int | IntoExprColumn | None=None, fraction: float | IntoExprColumn | None=None, with_replacement: bool=False, shuffle: bool=False, seed: int | None=None) -> Expr: ...
|
|
2034
|
+
|
|
2035
|
+
# Find indices where elements should be inserted to maintain order.
|
|
2036
|
+
def search_sorted(self, element: IntoExpr | np.ndarray[Any, Any], side: SearchSortedSide='any') -> Expr: ...
|
|
2037
|
+
|
|
2038
|
+
# Flags the expression as 'sorted'.
|
|
2039
|
+
def set_sorted(self, descending: bool=False) -> Expr: ...
|
|
2040
|
+
|
|
2041
|
+
# Shift values by the given number of indices.
|
|
2042
|
+
def shift(self, n: int | IntoExprColumn=1, fill_value: IntoExpr | None=None) -> Expr: ...
|
|
2043
|
+
|
|
2044
|
+
# Shrink numeric columns to the minimal required datatype.
|
|
2045
|
+
def shrink_dtype(self, ) -> Expr: ...
|
|
2046
|
+
|
|
2047
|
+
# Shuffle the contents of this expression.
|
|
2048
|
+
def shuffle(self, seed: int | None=None) -> Expr: ...
|
|
2049
|
+
|
|
2050
|
+
# Compute the element-wise sign function on numeric types.
|
|
2051
|
+
def sign(self, ) -> Expr: ...
|
|
2052
|
+
|
|
2053
|
+
# Compute the element-wise value for the sine.
|
|
2054
|
+
def sin(self, ) -> Expr: ...
|
|
2055
|
+
|
|
2056
|
+
# Compute the element-wise value for the hyperbolic sine.
|
|
2057
|
+
def sinh(self, ) -> Expr: ...
|
|
2058
|
+
|
|
2059
|
+
# Compute the sample skewness of a data set.
|
|
2060
|
+
def skew(self, bias: bool=True) -> Expr: ...
|
|
2061
|
+
|
|
2062
|
+
# Get a slice of this expression.
|
|
2063
|
+
def slice(self, offset: int | Expr, length: int | Expr | None=None) -> Expr: ...
|
|
2064
|
+
|
|
2065
|
+
def sort(self, descending=False, nulls_last=False) -> 'When': ...
|
|
2066
|
+
|
|
2067
|
+
# Sort this column by the ordering of other columns.
|
|
2068
|
+
def sort_by(self, by: IntoExpr | Iterable[IntoExpr], *more_by, descending: bool | Sequence[bool]=False, nulls_last: bool | Sequence[bool]=False, multithreaded: bool=True, maintain_order: bool=False) -> Expr: ...
|
|
2069
|
+
|
|
2070
|
+
# Compute the square root of the elements.
|
|
2071
|
+
def sqrt(self, ) -> Expr: ...
|
|
2072
|
+
|
|
2073
|
+
def std(self, ddof=1) -> Any: ...
|
|
2074
|
+
|
|
2075
|
+
# Method equivalent of subtraction operator `expr - other`.
|
|
2076
|
+
def sub(self, other: Any) -> Expr: ...
|
|
2077
|
+
|
|
2078
|
+
def sum(self, ) -> 'When': ...
|
|
2079
|
+
|
|
2080
|
+
# Get the last `n` rows.
|
|
2081
|
+
def tail(self, n: int | Expr=10) -> Expr: ...
|
|
2082
|
+
|
|
2083
|
+
# Compute the element-wise value for the tangent.
|
|
2084
|
+
def tan(self, ) -> Expr: ...
|
|
2085
|
+
|
|
2086
|
+
# Compute the element-wise value for the hyperbolic tangent.
|
|
2087
|
+
def tanh(self, ) -> Expr: ...
|
|
2088
|
+
|
|
2089
|
+
# Set the value to use when the condition is True.
|
|
2090
|
+
def then(self, value) -> Any: ...
|
|
2091
|
+
|
|
2092
|
+
# Cast to physical representation of the logical dtype.
|
|
2093
|
+
def to_physical(self, ) -> Expr: ...
|
|
2094
|
+
|
|
2095
|
+
# Return the `k` largest elements.
|
|
2096
|
+
def top_k(self, k: int | IntoExprColumn=5) -> Expr: ...
|
|
2097
|
+
|
|
2098
|
+
# Return the elements corresponding to the `k` largest elements of the `by` column(s).
|
|
2099
|
+
def top_k_by(self, by: IntoExpr | Iterable[IntoExpr], k: int | IntoExprColumn=5, reverse: bool | Sequence[bool]=False) -> Expr: ...
|
|
2100
|
+
|
|
2101
|
+
# Method equivalent of float division operator `expr / other`.
|
|
2102
|
+
def truediv(self, other: Any) -> Expr: ...
|
|
2103
|
+
|
|
2104
|
+
# Get unique values of this expression.
|
|
2105
|
+
def unique(self, maintain_order: bool=False) -> Expr: ...
|
|
2106
|
+
|
|
2107
|
+
# Return a count of the unique values in the order of appearance.
|
|
2108
|
+
def unique_counts(self, ) -> Expr: ...
|
|
2109
|
+
|
|
2110
|
+
# Calculate the upper bound.
|
|
2111
|
+
def upper_bound(self, ) -> Expr: ...
|
|
2112
|
+
|
|
2113
|
+
# Count the occurrences of unique values.
|
|
2114
|
+
def value_counts(self, sort: bool=False, parallel: bool=False, name: str | None=None, normalize: bool=False) -> Expr: ...
|
|
2115
|
+
|
|
2116
|
+
def var(self, ddof=1) -> Any: ...
|
|
2117
|
+
|
|
2118
|
+
# Create a new branch in the chain.
|
|
2119
|
+
def when(self, condition) -> Any: ...
|
|
2120
|
+
|
|
2121
|
+
# Filter a single column.
|
|
2122
|
+
def where(self, predicate: Expr) -> Expr: ...
|
|
2123
|
+
|
|
2124
|
+
# Method equivalent of bitwise exclusive-or operator `expr ^ other`.
|
|
2125
|
+
def xor(self, other: Any) -> Expr: ...
|
|
2126
|
+
|
|
2127
|
+
|
|
2128
|
+
# Enhanced decorator for aggregation functions that sets appropriate properties
|
|
2129
|
+
def agg_function(func=None, customize_repr=True) -> Expr: ...
|
|
2130
|
+
|
|
2131
|
+
# Creates a Column expression.
|
|
2132
|
+
def col(name: str) -> Column: ...
|
|
2133
|
+
|
|
2134
|
+
# Alias for col(). Creates a Column expression.
|
|
2135
|
+
def column(name: str) -> Column: ...
|
|
2136
|
+
|
|
2137
|
+
# Compute the correlation between two columns.
|
|
2138
|
+
def corr(a: Union[str, Expr], b: Union[str, Expr], method: str='pearson', ddof: int=None, propagate_nans: bool=False) -> Expr: ...
|
|
2139
|
+
|
|
2140
|
+
def count(*names) -> Expr: ...
|
|
2141
|
+
|
|
2142
|
+
# Compute the covariance between two columns.
|
|
2143
|
+
def cov(a: Union[str, Expr], b: Union[str, Expr], ddof: int=1) -> Expr: ...
|
|
2144
|
+
|
|
2145
|
+
# Return the cumulative count of the non-null values in the column.
|
|
2146
|
+
def cum_count(expr, reverse: bool=False) -> Expr: ...
|
|
2147
|
+
|
|
2148
|
+
def explode(*names) -> Expr: ...
|
|
2149
|
+
|
|
2150
|
+
def first(*names) -> Expr: ...
|
|
2151
|
+
|
|
2152
|
+
def implode(*names) -> Expr: ...
|
|
2153
|
+
|
|
2154
|
+
def last(*names) -> Expr: ...
|
|
2155
|
+
|
|
2156
|
+
def len() -> Expr: ...
|
|
2157
|
+
|
|
2158
|
+
# Creates a Literal expression.
|
|
2159
|
+
def lit(value: Any) -> Expr: ...
|
|
2160
|
+
|
|
2161
|
+
def max(*names) -> Expr: ...
|
|
2162
|
+
|
|
2163
|
+
def mean(*names) -> Expr: ...
|
|
2164
|
+
|
|
2165
|
+
def min(*names) -> Expr: ...
|
|
2166
|
+
|
|
2167
|
+
def std(column, ddof) -> Expr: ...
|
|
2168
|
+
|
|
2169
|
+
def sum(*names) -> Expr: ...
|
|
2170
|
+
|
|
2171
|
+
def var(column, ddof) -> Expr: ...
|
|
2172
|
+
|
|
2173
|
+
# Start a when-then-otherwise expression.
|
|
2174
|
+
def when(condition) -> Expr: ...
|