polars-runtime-compat 1.34.0b3__cp39-abi3-macosx_10_12_x86_64.whl → 1.34.0b4__cp39-abi3-macosx_10_12_x86_64.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 polars-runtime-compat might be problematic. Click here for more details.
- _polars_runtime_compat/_polars_runtime_compat.abi3.so +0 -0
- {polars_runtime_compat-1.34.0b3.dist-info → polars_runtime_compat-1.34.0b4.dist-info}/METADATA +1 -1
- polars_runtime_compat-1.34.0b4.dist-info/RECORD +6 -0
- polars/__init__.py +0 -528
- polars/_cpu_check.py +0 -265
- polars/_dependencies.py +0 -355
- polars/_plr.py +0 -99
- polars/_plr.pyi +0 -2496
- polars/_reexport.py +0 -23
- polars/_typing.py +0 -478
- polars/_utils/__init__.py +0 -37
- polars/_utils/async_.py +0 -102
- polars/_utils/cache.py +0 -176
- polars/_utils/cloud.py +0 -40
- polars/_utils/constants.py +0 -29
- polars/_utils/construction/__init__.py +0 -46
- polars/_utils/construction/dataframe.py +0 -1397
- polars/_utils/construction/other.py +0 -72
- polars/_utils/construction/series.py +0 -560
- polars/_utils/construction/utils.py +0 -118
- polars/_utils/convert.py +0 -224
- polars/_utils/deprecation.py +0 -406
- polars/_utils/getitem.py +0 -457
- polars/_utils/logging.py +0 -11
- polars/_utils/nest_asyncio.py +0 -264
- polars/_utils/parquet.py +0 -15
- polars/_utils/parse/__init__.py +0 -12
- polars/_utils/parse/expr.py +0 -242
- polars/_utils/polars_version.py +0 -19
- polars/_utils/pycapsule.py +0 -53
- polars/_utils/scan.py +0 -27
- polars/_utils/serde.py +0 -63
- polars/_utils/slice.py +0 -215
- polars/_utils/udfs.py +0 -1251
- polars/_utils/unstable.py +0 -63
- polars/_utils/various.py +0 -782
- polars/_utils/wrap.py +0 -25
- polars/api.py +0 -370
- polars/catalog/__init__.py +0 -0
- polars/catalog/unity/__init__.py +0 -19
- polars/catalog/unity/client.py +0 -733
- polars/catalog/unity/models.py +0 -152
- polars/config.py +0 -1571
- polars/convert/__init__.py +0 -25
- polars/convert/general.py +0 -1046
- polars/convert/normalize.py +0 -261
- polars/dataframe/__init__.py +0 -5
- polars/dataframe/_html.py +0 -186
- polars/dataframe/frame.py +0 -12582
- polars/dataframe/group_by.py +0 -1067
- polars/dataframe/plotting.py +0 -257
- polars/datatype_expr/__init__.py +0 -5
- polars/datatype_expr/array.py +0 -56
- polars/datatype_expr/datatype_expr.py +0 -304
- polars/datatype_expr/list.py +0 -18
- polars/datatype_expr/struct.py +0 -69
- polars/datatypes/__init__.py +0 -122
- polars/datatypes/_parse.py +0 -195
- polars/datatypes/_utils.py +0 -48
- polars/datatypes/classes.py +0 -1213
- polars/datatypes/constants.py +0 -11
- polars/datatypes/constructor.py +0 -172
- polars/datatypes/convert.py +0 -366
- polars/datatypes/group.py +0 -130
- polars/exceptions.py +0 -230
- polars/expr/__init__.py +0 -7
- polars/expr/array.py +0 -964
- polars/expr/binary.py +0 -346
- polars/expr/categorical.py +0 -306
- polars/expr/datetime.py +0 -2620
- polars/expr/expr.py +0 -11272
- polars/expr/list.py +0 -1408
- polars/expr/meta.py +0 -444
- polars/expr/name.py +0 -321
- polars/expr/string.py +0 -3045
- polars/expr/struct.py +0 -357
- polars/expr/whenthen.py +0 -185
- polars/functions/__init__.py +0 -193
- polars/functions/aggregation/__init__.py +0 -33
- polars/functions/aggregation/horizontal.py +0 -298
- polars/functions/aggregation/vertical.py +0 -341
- polars/functions/as_datatype.py +0 -848
- polars/functions/business.py +0 -138
- polars/functions/col.py +0 -384
- polars/functions/datatype.py +0 -121
- polars/functions/eager.py +0 -524
- polars/functions/escape_regex.py +0 -29
- polars/functions/lazy.py +0 -2751
- polars/functions/len.py +0 -68
- polars/functions/lit.py +0 -210
- polars/functions/random.py +0 -22
- polars/functions/range/__init__.py +0 -19
- polars/functions/range/_utils.py +0 -15
- polars/functions/range/date_range.py +0 -303
- polars/functions/range/datetime_range.py +0 -370
- polars/functions/range/int_range.py +0 -348
- polars/functions/range/linear_space.py +0 -311
- polars/functions/range/time_range.py +0 -287
- polars/functions/repeat.py +0 -301
- polars/functions/whenthen.py +0 -353
- polars/interchange/__init__.py +0 -10
- polars/interchange/buffer.py +0 -77
- polars/interchange/column.py +0 -190
- polars/interchange/dataframe.py +0 -230
- polars/interchange/from_dataframe.py +0 -328
- polars/interchange/protocol.py +0 -303
- polars/interchange/utils.py +0 -170
- polars/io/__init__.py +0 -64
- polars/io/_utils.py +0 -317
- polars/io/avro.py +0 -49
- polars/io/clipboard.py +0 -36
- polars/io/cloud/__init__.py +0 -17
- polars/io/cloud/_utils.py +0 -80
- polars/io/cloud/credential_provider/__init__.py +0 -17
- polars/io/cloud/credential_provider/_builder.py +0 -520
- polars/io/cloud/credential_provider/_providers.py +0 -618
- polars/io/csv/__init__.py +0 -9
- polars/io/csv/_utils.py +0 -38
- polars/io/csv/batched_reader.py +0 -142
- polars/io/csv/functions.py +0 -1495
- polars/io/database/__init__.py +0 -6
- polars/io/database/_arrow_registry.py +0 -70
- polars/io/database/_cursor_proxies.py +0 -147
- polars/io/database/_executor.py +0 -578
- polars/io/database/_inference.py +0 -314
- polars/io/database/_utils.py +0 -144
- polars/io/database/functions.py +0 -516
- polars/io/delta.py +0 -499
- polars/io/iceberg/__init__.py +0 -3
- polars/io/iceberg/_utils.py +0 -697
- polars/io/iceberg/dataset.py +0 -556
- polars/io/iceberg/functions.py +0 -151
- polars/io/ipc/__init__.py +0 -8
- polars/io/ipc/functions.py +0 -514
- polars/io/json/__init__.py +0 -3
- polars/io/json/read.py +0 -101
- polars/io/ndjson.py +0 -332
- polars/io/parquet/__init__.py +0 -17
- polars/io/parquet/field_overwrites.py +0 -140
- polars/io/parquet/functions.py +0 -722
- polars/io/partition.py +0 -491
- polars/io/plugins.py +0 -187
- polars/io/pyarrow_dataset/__init__.py +0 -5
- polars/io/pyarrow_dataset/anonymous_scan.py +0 -109
- polars/io/pyarrow_dataset/functions.py +0 -79
- polars/io/scan_options/__init__.py +0 -5
- polars/io/scan_options/_options.py +0 -59
- polars/io/scan_options/cast_options.py +0 -126
- polars/io/spreadsheet/__init__.py +0 -6
- polars/io/spreadsheet/_utils.py +0 -52
- polars/io/spreadsheet/_write_utils.py +0 -647
- polars/io/spreadsheet/functions.py +0 -1323
- polars/lazyframe/__init__.py +0 -9
- polars/lazyframe/engine_config.py +0 -61
- polars/lazyframe/frame.py +0 -8564
- polars/lazyframe/group_by.py +0 -669
- polars/lazyframe/in_process.py +0 -42
- polars/lazyframe/opt_flags.py +0 -333
- polars/meta/__init__.py +0 -14
- polars/meta/build.py +0 -33
- polars/meta/index_type.py +0 -27
- polars/meta/thread_pool.py +0 -50
- polars/meta/versions.py +0 -120
- polars/ml/__init__.py +0 -0
- polars/ml/torch.py +0 -213
- polars/ml/utilities.py +0 -30
- polars/plugins.py +0 -155
- polars/py.typed +0 -0
- polars/pyproject.toml +0 -103
- polars/schema.py +0 -265
- polars/selectors.py +0 -3117
- polars/series/__init__.py +0 -5
- polars/series/array.py +0 -776
- polars/series/binary.py +0 -254
- polars/series/categorical.py +0 -246
- polars/series/datetime.py +0 -2275
- polars/series/list.py +0 -1087
- polars/series/plotting.py +0 -191
- polars/series/series.py +0 -9197
- polars/series/string.py +0 -2367
- polars/series/struct.py +0 -154
- polars/series/utils.py +0 -191
- polars/sql/__init__.py +0 -7
- polars/sql/context.py +0 -677
- polars/sql/functions.py +0 -139
- polars/string_cache.py +0 -185
- polars/testing/__init__.py +0 -13
- polars/testing/asserts/__init__.py +0 -9
- polars/testing/asserts/frame.py +0 -231
- polars/testing/asserts/series.py +0 -219
- polars/testing/asserts/utils.py +0 -12
- polars/testing/parametric/__init__.py +0 -33
- polars/testing/parametric/profiles.py +0 -107
- polars/testing/parametric/strategies/__init__.py +0 -22
- polars/testing/parametric/strategies/_utils.py +0 -14
- polars/testing/parametric/strategies/core.py +0 -615
- polars/testing/parametric/strategies/data.py +0 -452
- polars/testing/parametric/strategies/dtype.py +0 -436
- polars/testing/parametric/strategies/legacy.py +0 -169
- polars/type_aliases.py +0 -24
- polars_runtime_compat-1.34.0b3.dist-info/RECORD +0 -203
- {polars_runtime_compat-1.34.0b3.dist-info → polars_runtime_compat-1.34.0b4.dist-info}/WHEEL +0 -0
- {polars_runtime_compat-1.34.0b3.dist-info → polars_runtime_compat-1.34.0b4.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
polars_runtime_compat-1.34.0b4.dist-info/METADATA,sha256=Wysgw3MI6Lfj4i1FuXDRas_2_HIoqYilOvV-EJVE40A,7308
|
|
2
|
+
polars_runtime_compat-1.34.0b4.dist-info/WHEEL,sha256=LVKiu9bgLUJICf_rdtmZa1cUv-Xgh7w2DRRx_2zV2Fs,104
|
|
3
|
+
polars_runtime_compat-1.34.0b4.dist-info/licenses/LICENSE,sha256=TSDKkMRxpvPXNgVdp1bbHOJAOMKGmk31x4vlZo2voVs,1143
|
|
4
|
+
_polars_runtime_compat/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
_polars_runtime_compat/_polars_runtime_compat.abi3.so,sha256=aUJe358a4j-8pBDc6YfLnszDwTX9vLtMSH8GKc1LE68,122081016
|
|
6
|
+
polars_runtime_compat-1.34.0b4.dist-info/RECORD,,
|
polars/__init__.py
DELETED
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Polars: Blazingly fast DataFrames
|
|
3
|
-
=================================
|
|
4
|
-
|
|
5
|
-
Polars is a fast, open-source library for data manipulation with an expressive, typed API.
|
|
6
|
-
|
|
7
|
-
Basic usage:
|
|
8
|
-
|
|
9
|
-
>>> import polars as pl
|
|
10
|
-
>>> df = pl.DataFrame(
|
|
11
|
-
... {
|
|
12
|
-
... "name": ["Alice", "Bob", "Charlie"],
|
|
13
|
-
... "age": [25, 30, 35],
|
|
14
|
-
... "city": ["New York", "London", "Tokyo"],
|
|
15
|
-
... }
|
|
16
|
-
... )
|
|
17
|
-
>>> df.filter(pl.col("age") > 28)
|
|
18
|
-
shape: (2, 3)
|
|
19
|
-
┌─────────┬─────┬────────┐
|
|
20
|
-
│ name ┆ age ┆ city │
|
|
21
|
-
│ --- ┆ --- ┆ --- │
|
|
22
|
-
│ str ┆ i64 ┆ str │
|
|
23
|
-
╞═════════╪═════╪════════╡
|
|
24
|
-
│ Bob ┆ 30 ┆ London │
|
|
25
|
-
│ Charlie ┆ 35 ┆ Tokyo │
|
|
26
|
-
└─────────┴─────┴────────┘
|
|
27
|
-
|
|
28
|
-
User Guide: https://docs.pola.rs/
|
|
29
|
-
Python API Documentation: https://docs.pola.rs/api/python/stable/
|
|
30
|
-
Source Code: https://github.com/pola-rs/polars
|
|
31
|
-
""" # noqa: D400, W505, D205
|
|
32
|
-
|
|
33
|
-
import contextlib
|
|
34
|
-
|
|
35
|
-
with contextlib.suppress(ImportError): # Module not available when building docs
|
|
36
|
-
# We also configure the allocator before importing the Polars Rust bindings.
|
|
37
|
-
# See https://github.com/pola-rs/polars/issues/18088,
|
|
38
|
-
# https://github.com/pola-rs/polars/pull/21829.
|
|
39
|
-
import os
|
|
40
|
-
|
|
41
|
-
jemalloc_conf = "dirty_decay_ms:500,muzzy_decay_ms:-1"
|
|
42
|
-
if os.environ.get("POLARS_THP") == "1":
|
|
43
|
-
jemalloc_conf += ",thp:always,metadata_thp:always"
|
|
44
|
-
if override := os.environ.get("_RJEM_MALLOC_CONF"):
|
|
45
|
-
jemalloc_conf += "," + override
|
|
46
|
-
os.environ["_RJEM_MALLOC_CONF"] = jemalloc_conf
|
|
47
|
-
|
|
48
|
-
# Initialize polars on the rust side. This function is highly
|
|
49
|
-
# unsafe and should only be called once.
|
|
50
|
-
from polars._plr import __register_startup_deps
|
|
51
|
-
|
|
52
|
-
__register_startup_deps()
|
|
53
|
-
|
|
54
|
-
from typing import TYPE_CHECKING, Any
|
|
55
|
-
|
|
56
|
-
from polars import api, exceptions, plugins, selectors
|
|
57
|
-
from polars._utils.polars_version import get_polars_version as _get_polars_version
|
|
58
|
-
|
|
59
|
-
# TODO: remove need for importing wrap utils at top level
|
|
60
|
-
from polars._utils.wrap import wrap_df, wrap_s # noqa: F401
|
|
61
|
-
from polars.catalog.unity import Catalog
|
|
62
|
-
from polars.config import Config
|
|
63
|
-
from polars.convert import (
|
|
64
|
-
from_arrow,
|
|
65
|
-
from_dataframe,
|
|
66
|
-
from_dict,
|
|
67
|
-
from_dicts,
|
|
68
|
-
from_numpy,
|
|
69
|
-
from_pandas,
|
|
70
|
-
from_records,
|
|
71
|
-
from_repr,
|
|
72
|
-
from_torch,
|
|
73
|
-
json_normalize,
|
|
74
|
-
)
|
|
75
|
-
from polars.dataframe import DataFrame
|
|
76
|
-
from polars.datatype_expr import DataTypeExpr
|
|
77
|
-
from polars.datatypes import (
|
|
78
|
-
Array,
|
|
79
|
-
Binary,
|
|
80
|
-
Boolean,
|
|
81
|
-
Categorical,
|
|
82
|
-
Categories,
|
|
83
|
-
DataType,
|
|
84
|
-
Date,
|
|
85
|
-
Datetime,
|
|
86
|
-
Decimal,
|
|
87
|
-
Duration,
|
|
88
|
-
Enum,
|
|
89
|
-
Field,
|
|
90
|
-
Float32,
|
|
91
|
-
Float64,
|
|
92
|
-
Int8,
|
|
93
|
-
Int16,
|
|
94
|
-
Int32,
|
|
95
|
-
Int64,
|
|
96
|
-
Int128,
|
|
97
|
-
List,
|
|
98
|
-
Null,
|
|
99
|
-
Object,
|
|
100
|
-
String,
|
|
101
|
-
Struct,
|
|
102
|
-
Time,
|
|
103
|
-
UInt8,
|
|
104
|
-
UInt16,
|
|
105
|
-
UInt32,
|
|
106
|
-
UInt64,
|
|
107
|
-
UInt128,
|
|
108
|
-
Unknown,
|
|
109
|
-
Utf8,
|
|
110
|
-
)
|
|
111
|
-
from polars.expr import Expr
|
|
112
|
-
from polars.functions import (
|
|
113
|
-
align_frames,
|
|
114
|
-
all,
|
|
115
|
-
all_horizontal,
|
|
116
|
-
any,
|
|
117
|
-
any_horizontal,
|
|
118
|
-
approx_n_unique,
|
|
119
|
-
arange,
|
|
120
|
-
arctan2,
|
|
121
|
-
arctan2d,
|
|
122
|
-
arg_sort_by,
|
|
123
|
-
arg_where,
|
|
124
|
-
business_day_count,
|
|
125
|
-
coalesce,
|
|
126
|
-
col,
|
|
127
|
-
collect_all,
|
|
128
|
-
collect_all_async,
|
|
129
|
-
concat,
|
|
130
|
-
concat_arr,
|
|
131
|
-
concat_list,
|
|
132
|
-
concat_str,
|
|
133
|
-
corr,
|
|
134
|
-
count,
|
|
135
|
-
cov,
|
|
136
|
-
cum_count,
|
|
137
|
-
cum_fold,
|
|
138
|
-
cum_reduce,
|
|
139
|
-
cum_sum,
|
|
140
|
-
cum_sum_horizontal,
|
|
141
|
-
date,
|
|
142
|
-
date_range,
|
|
143
|
-
date_ranges,
|
|
144
|
-
datetime,
|
|
145
|
-
datetime_range,
|
|
146
|
-
datetime_ranges,
|
|
147
|
-
dtype_of,
|
|
148
|
-
duration,
|
|
149
|
-
element,
|
|
150
|
-
escape_regex,
|
|
151
|
-
exclude,
|
|
152
|
-
explain_all,
|
|
153
|
-
field,
|
|
154
|
-
first,
|
|
155
|
-
fold,
|
|
156
|
-
format,
|
|
157
|
-
from_epoch,
|
|
158
|
-
groups,
|
|
159
|
-
head,
|
|
160
|
-
implode,
|
|
161
|
-
int_range,
|
|
162
|
-
int_ranges,
|
|
163
|
-
last,
|
|
164
|
-
len,
|
|
165
|
-
linear_space,
|
|
166
|
-
linear_spaces,
|
|
167
|
-
lit,
|
|
168
|
-
map_batches,
|
|
169
|
-
map_groups,
|
|
170
|
-
max,
|
|
171
|
-
max_horizontal,
|
|
172
|
-
mean,
|
|
173
|
-
mean_horizontal,
|
|
174
|
-
median,
|
|
175
|
-
min,
|
|
176
|
-
min_horizontal,
|
|
177
|
-
n_unique,
|
|
178
|
-
nth,
|
|
179
|
-
ones,
|
|
180
|
-
quantile,
|
|
181
|
-
reduce,
|
|
182
|
-
repeat,
|
|
183
|
-
rolling_corr,
|
|
184
|
-
rolling_cov,
|
|
185
|
-
row_index,
|
|
186
|
-
select,
|
|
187
|
-
self_dtype,
|
|
188
|
-
set_random_seed,
|
|
189
|
-
sql_expr,
|
|
190
|
-
std,
|
|
191
|
-
struct,
|
|
192
|
-
struct_with_fields,
|
|
193
|
-
sum,
|
|
194
|
-
sum_horizontal,
|
|
195
|
-
tail,
|
|
196
|
-
time,
|
|
197
|
-
time_range,
|
|
198
|
-
time_ranges,
|
|
199
|
-
var,
|
|
200
|
-
when,
|
|
201
|
-
zeros,
|
|
202
|
-
)
|
|
203
|
-
from polars.interchange import CompatLevel
|
|
204
|
-
from polars.io import (
|
|
205
|
-
BasePartitionContext,
|
|
206
|
-
KeyedPartition,
|
|
207
|
-
KeyedPartitionContext,
|
|
208
|
-
PartitionByKey,
|
|
209
|
-
PartitionMaxSize,
|
|
210
|
-
PartitionParted,
|
|
211
|
-
ScanCastOptions,
|
|
212
|
-
defer,
|
|
213
|
-
read_avro,
|
|
214
|
-
read_clipboard,
|
|
215
|
-
read_csv,
|
|
216
|
-
read_csv_batched,
|
|
217
|
-
read_database,
|
|
218
|
-
read_database_uri,
|
|
219
|
-
read_delta,
|
|
220
|
-
read_excel,
|
|
221
|
-
read_ipc,
|
|
222
|
-
read_ipc_schema,
|
|
223
|
-
read_ipc_stream,
|
|
224
|
-
read_json,
|
|
225
|
-
read_ndjson,
|
|
226
|
-
read_ods,
|
|
227
|
-
read_parquet,
|
|
228
|
-
read_parquet_metadata,
|
|
229
|
-
read_parquet_schema,
|
|
230
|
-
scan_csv,
|
|
231
|
-
scan_delta,
|
|
232
|
-
scan_iceberg,
|
|
233
|
-
scan_ipc,
|
|
234
|
-
scan_ndjson,
|
|
235
|
-
scan_parquet,
|
|
236
|
-
scan_pyarrow_dataset,
|
|
237
|
-
)
|
|
238
|
-
from polars.io.cloud import (
|
|
239
|
-
CredentialProvider,
|
|
240
|
-
CredentialProviderAWS,
|
|
241
|
-
CredentialProviderAzure,
|
|
242
|
-
CredentialProviderFunction,
|
|
243
|
-
CredentialProviderFunctionReturn,
|
|
244
|
-
CredentialProviderGCP,
|
|
245
|
-
)
|
|
246
|
-
from polars.lazyframe import GPUEngine, LazyFrame, QueryOptFlags
|
|
247
|
-
from polars.meta import (
|
|
248
|
-
build_info,
|
|
249
|
-
get_index_type,
|
|
250
|
-
show_versions,
|
|
251
|
-
thread_pool_size,
|
|
252
|
-
threadpool_size,
|
|
253
|
-
)
|
|
254
|
-
from polars.schema import Schema
|
|
255
|
-
from polars.series import Series
|
|
256
|
-
from polars.sql import SQLContext, sql
|
|
257
|
-
from polars.string_cache import (
|
|
258
|
-
StringCache,
|
|
259
|
-
disable_string_cache,
|
|
260
|
-
enable_string_cache,
|
|
261
|
-
using_string_cache,
|
|
262
|
-
)
|
|
263
|
-
|
|
264
|
-
__version__: str = _get_polars_version()
|
|
265
|
-
del _get_polars_version
|
|
266
|
-
|
|
267
|
-
__all__ = [
|
|
268
|
-
# modules
|
|
269
|
-
"api",
|
|
270
|
-
"exceptions",
|
|
271
|
-
"plugins",
|
|
272
|
-
"selectors",
|
|
273
|
-
# core classes
|
|
274
|
-
"DataFrame",
|
|
275
|
-
"Expr",
|
|
276
|
-
"LazyFrame",
|
|
277
|
-
"Series",
|
|
278
|
-
# Engine configuration
|
|
279
|
-
"GPUEngine",
|
|
280
|
-
# schema
|
|
281
|
-
"Schema",
|
|
282
|
-
# datatype_expr
|
|
283
|
-
"DataTypeExpr",
|
|
284
|
-
# datatypes
|
|
285
|
-
"Array",
|
|
286
|
-
"Binary",
|
|
287
|
-
"Boolean",
|
|
288
|
-
"Categorical",
|
|
289
|
-
"Categories",
|
|
290
|
-
"DataType",
|
|
291
|
-
"Date",
|
|
292
|
-
"Datetime",
|
|
293
|
-
"Decimal",
|
|
294
|
-
"Duration",
|
|
295
|
-
"Enum",
|
|
296
|
-
"Field",
|
|
297
|
-
"Float32",
|
|
298
|
-
"Float64",
|
|
299
|
-
"Int8",
|
|
300
|
-
"Int16",
|
|
301
|
-
"Int32",
|
|
302
|
-
"Int64",
|
|
303
|
-
"Int128",
|
|
304
|
-
"List",
|
|
305
|
-
"Null",
|
|
306
|
-
"Object",
|
|
307
|
-
"String",
|
|
308
|
-
"Struct",
|
|
309
|
-
"Time",
|
|
310
|
-
"UInt8",
|
|
311
|
-
"UInt16",
|
|
312
|
-
"UInt32",
|
|
313
|
-
"UInt64",
|
|
314
|
-
"UInt128",
|
|
315
|
-
"Unknown",
|
|
316
|
-
"Utf8",
|
|
317
|
-
# polars.io
|
|
318
|
-
"defer",
|
|
319
|
-
"KeyedPartition",
|
|
320
|
-
"BasePartitionContext",
|
|
321
|
-
"KeyedPartitionContext",
|
|
322
|
-
"PartitionByKey",
|
|
323
|
-
"PartitionMaxSize",
|
|
324
|
-
"PartitionParted",
|
|
325
|
-
"ScanCastOptions",
|
|
326
|
-
"read_avro",
|
|
327
|
-
"read_clipboard",
|
|
328
|
-
"read_csv",
|
|
329
|
-
"read_csv_batched",
|
|
330
|
-
"read_database",
|
|
331
|
-
"read_database_uri",
|
|
332
|
-
"read_delta",
|
|
333
|
-
"read_excel",
|
|
334
|
-
"read_ipc",
|
|
335
|
-
"read_ipc_schema",
|
|
336
|
-
"read_ipc_stream",
|
|
337
|
-
"read_json",
|
|
338
|
-
"read_ndjson",
|
|
339
|
-
"read_ods",
|
|
340
|
-
"read_parquet",
|
|
341
|
-
"read_parquet_metadata",
|
|
342
|
-
"read_parquet_schema",
|
|
343
|
-
"scan_csv",
|
|
344
|
-
"scan_delta",
|
|
345
|
-
"scan_iceberg",
|
|
346
|
-
"scan_ipc",
|
|
347
|
-
"scan_ndjson",
|
|
348
|
-
"scan_parquet",
|
|
349
|
-
"scan_pyarrow_dataset",
|
|
350
|
-
"Catalog",
|
|
351
|
-
# polars.io.cloud
|
|
352
|
-
"CredentialProvider",
|
|
353
|
-
"CredentialProviderAWS",
|
|
354
|
-
"CredentialProviderAzure",
|
|
355
|
-
"CredentialProviderFunction",
|
|
356
|
-
"CredentialProviderFunctionReturn",
|
|
357
|
-
"CredentialProviderGCP",
|
|
358
|
-
# polars.stringcache
|
|
359
|
-
"StringCache",
|
|
360
|
-
"disable_string_cache",
|
|
361
|
-
"enable_string_cache",
|
|
362
|
-
"using_string_cache",
|
|
363
|
-
# polars.config
|
|
364
|
-
"Config",
|
|
365
|
-
# polars.functions.whenthen
|
|
366
|
-
"when",
|
|
367
|
-
# polars.functions
|
|
368
|
-
"align_frames",
|
|
369
|
-
"arg_where",
|
|
370
|
-
"business_day_count",
|
|
371
|
-
"concat",
|
|
372
|
-
"dtype_of",
|
|
373
|
-
"struct_with_fields",
|
|
374
|
-
"date_range",
|
|
375
|
-
"date_ranges",
|
|
376
|
-
"datetime_range",
|
|
377
|
-
"datetime_ranges",
|
|
378
|
-
"element",
|
|
379
|
-
"ones",
|
|
380
|
-
"repeat",
|
|
381
|
-
"self_dtype",
|
|
382
|
-
"time_range",
|
|
383
|
-
"time_ranges",
|
|
384
|
-
"zeros",
|
|
385
|
-
"escape_regex",
|
|
386
|
-
# polars.functions.aggregation
|
|
387
|
-
"all",
|
|
388
|
-
"all_horizontal",
|
|
389
|
-
"any",
|
|
390
|
-
"any_horizontal",
|
|
391
|
-
"cum_sum",
|
|
392
|
-
"cum_sum_horizontal",
|
|
393
|
-
"max",
|
|
394
|
-
"max_horizontal",
|
|
395
|
-
"mean_horizontal",
|
|
396
|
-
"min",
|
|
397
|
-
"min_horizontal",
|
|
398
|
-
"sum",
|
|
399
|
-
"sum_horizontal",
|
|
400
|
-
# polars.functions.lazy
|
|
401
|
-
"approx_n_unique",
|
|
402
|
-
"arange",
|
|
403
|
-
"arctan2",
|
|
404
|
-
"arctan2d",
|
|
405
|
-
"arg_sort_by",
|
|
406
|
-
"coalesce",
|
|
407
|
-
"col",
|
|
408
|
-
"collect_all",
|
|
409
|
-
"collect_all_async",
|
|
410
|
-
"concat_arr",
|
|
411
|
-
"concat_list",
|
|
412
|
-
"concat_str",
|
|
413
|
-
"corr",
|
|
414
|
-
"count",
|
|
415
|
-
"cov",
|
|
416
|
-
"cum_count",
|
|
417
|
-
"cum_fold",
|
|
418
|
-
"cum_reduce",
|
|
419
|
-
"date",
|
|
420
|
-
"datetime",
|
|
421
|
-
"duration",
|
|
422
|
-
"exclude",
|
|
423
|
-
"explain_all",
|
|
424
|
-
"field",
|
|
425
|
-
"first",
|
|
426
|
-
"fold",
|
|
427
|
-
"format",
|
|
428
|
-
"from_epoch",
|
|
429
|
-
"groups",
|
|
430
|
-
"head",
|
|
431
|
-
"implode",
|
|
432
|
-
"int_range",
|
|
433
|
-
"int_ranges",
|
|
434
|
-
"last",
|
|
435
|
-
"linear_space",
|
|
436
|
-
"linear_spaces",
|
|
437
|
-
"lit",
|
|
438
|
-
"map_batches",
|
|
439
|
-
"map_groups",
|
|
440
|
-
"mean",
|
|
441
|
-
"median",
|
|
442
|
-
"n_unique",
|
|
443
|
-
"nth",
|
|
444
|
-
"quantile",
|
|
445
|
-
"reduce",
|
|
446
|
-
"rolling_corr",
|
|
447
|
-
"rolling_cov",
|
|
448
|
-
"row_index",
|
|
449
|
-
"select",
|
|
450
|
-
"std",
|
|
451
|
-
"struct",
|
|
452
|
-
"tail",
|
|
453
|
-
"time",
|
|
454
|
-
"var",
|
|
455
|
-
# polars.functions.len
|
|
456
|
-
"len",
|
|
457
|
-
# polars.functions.random
|
|
458
|
-
"set_random_seed",
|
|
459
|
-
# polars.convert
|
|
460
|
-
"from_arrow",
|
|
461
|
-
"from_dataframe",
|
|
462
|
-
"from_dict",
|
|
463
|
-
"from_dicts",
|
|
464
|
-
"from_numpy",
|
|
465
|
-
"from_pandas",
|
|
466
|
-
"from_records",
|
|
467
|
-
"from_repr",
|
|
468
|
-
"from_torch",
|
|
469
|
-
"json_normalize",
|
|
470
|
-
# polars.meta
|
|
471
|
-
"build_info",
|
|
472
|
-
"get_index_type",
|
|
473
|
-
"show_versions",
|
|
474
|
-
"thread_pool_size",
|
|
475
|
-
"threadpool_size",
|
|
476
|
-
# polars.sql
|
|
477
|
-
"SQLContext",
|
|
478
|
-
"sql",
|
|
479
|
-
"sql_expr",
|
|
480
|
-
"CompatLevel",
|
|
481
|
-
# optimization
|
|
482
|
-
"QueryOptFlags",
|
|
483
|
-
]
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
if not TYPE_CHECKING:
|
|
487
|
-
with contextlib.suppress(ImportError): # Module not available when building docs
|
|
488
|
-
import polars._plr as plr
|
|
489
|
-
|
|
490
|
-
# This causes typechecking to resolve any Polars module attribute
|
|
491
|
-
# as Any regardless of existence so we check for TYPE_CHECKING, see #24334.
|
|
492
|
-
def __getattr__(name: str) -> Any:
|
|
493
|
-
# Backwards compatibility for plugins. This used to be called `polars.polars`,
|
|
494
|
-
# but is now `polars._plr`.
|
|
495
|
-
if name == "polars":
|
|
496
|
-
return plr
|
|
497
|
-
elif name == "_allocator":
|
|
498
|
-
return plr._allocator
|
|
499
|
-
|
|
500
|
-
# Deprecate re-export of exceptions at top-level
|
|
501
|
-
if name in dir(exceptions):
|
|
502
|
-
from polars._utils.deprecation import issue_deprecation_warning
|
|
503
|
-
|
|
504
|
-
issue_deprecation_warning(
|
|
505
|
-
message=(
|
|
506
|
-
f"accessing `{name}` from the top-level `polars` module was deprecated "
|
|
507
|
-
"in version 1.0.0. Import it directly from the `polars.exceptions` module "
|
|
508
|
-
f"instead, e.g.: `from polars.exceptions import {name}`"
|
|
509
|
-
),
|
|
510
|
-
)
|
|
511
|
-
return getattr(exceptions, name)
|
|
512
|
-
|
|
513
|
-
# Deprecate data type groups at top-level
|
|
514
|
-
import polars.datatypes.group as dtgroup
|
|
515
|
-
|
|
516
|
-
if name in dir(dtgroup):
|
|
517
|
-
from polars._utils.deprecation import issue_deprecation_warning
|
|
518
|
-
|
|
519
|
-
issue_deprecation_warning(
|
|
520
|
-
message=(
|
|
521
|
-
f"`{name}` was deprecated in version 1.0.0. Define your own data type groups or "
|
|
522
|
-
"use the `polars.selectors` module for selecting columns of a certain data type."
|
|
523
|
-
),
|
|
524
|
-
)
|
|
525
|
-
return getattr(dtgroup, name)
|
|
526
|
-
|
|
527
|
-
msg = f"module {__name__!r} has no attribute {name!r}"
|
|
528
|
-
raise AttributeError(msg)
|