polars-runtime-compat 1.34.0b3__cp39-abi3-manylinux_2_24_aarch64.whl → 1.34.0b5__cp39-abi3-manylinux_2_24_aarch64.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.

Files changed (204) hide show
  1. _polars_runtime_compat/_polars_runtime_compat.abi3.so +0 -0
  2. polars_runtime_compat-1.34.0b5.dist-info/METADATA +35 -0
  3. polars_runtime_compat-1.34.0b5.dist-info/RECORD +6 -0
  4. polars/__init__.py +0 -528
  5. polars/_cpu_check.py +0 -265
  6. polars/_dependencies.py +0 -355
  7. polars/_plr.py +0 -99
  8. polars/_plr.pyi +0 -2496
  9. polars/_reexport.py +0 -23
  10. polars/_typing.py +0 -478
  11. polars/_utils/__init__.py +0 -37
  12. polars/_utils/async_.py +0 -102
  13. polars/_utils/cache.py +0 -176
  14. polars/_utils/cloud.py +0 -40
  15. polars/_utils/constants.py +0 -29
  16. polars/_utils/construction/__init__.py +0 -46
  17. polars/_utils/construction/dataframe.py +0 -1397
  18. polars/_utils/construction/other.py +0 -72
  19. polars/_utils/construction/series.py +0 -560
  20. polars/_utils/construction/utils.py +0 -118
  21. polars/_utils/convert.py +0 -224
  22. polars/_utils/deprecation.py +0 -406
  23. polars/_utils/getitem.py +0 -457
  24. polars/_utils/logging.py +0 -11
  25. polars/_utils/nest_asyncio.py +0 -264
  26. polars/_utils/parquet.py +0 -15
  27. polars/_utils/parse/__init__.py +0 -12
  28. polars/_utils/parse/expr.py +0 -242
  29. polars/_utils/polars_version.py +0 -19
  30. polars/_utils/pycapsule.py +0 -53
  31. polars/_utils/scan.py +0 -27
  32. polars/_utils/serde.py +0 -63
  33. polars/_utils/slice.py +0 -215
  34. polars/_utils/udfs.py +0 -1251
  35. polars/_utils/unstable.py +0 -63
  36. polars/_utils/various.py +0 -782
  37. polars/_utils/wrap.py +0 -25
  38. polars/api.py +0 -370
  39. polars/catalog/__init__.py +0 -0
  40. polars/catalog/unity/__init__.py +0 -19
  41. polars/catalog/unity/client.py +0 -733
  42. polars/catalog/unity/models.py +0 -152
  43. polars/config.py +0 -1571
  44. polars/convert/__init__.py +0 -25
  45. polars/convert/general.py +0 -1046
  46. polars/convert/normalize.py +0 -261
  47. polars/dataframe/__init__.py +0 -5
  48. polars/dataframe/_html.py +0 -186
  49. polars/dataframe/frame.py +0 -12582
  50. polars/dataframe/group_by.py +0 -1067
  51. polars/dataframe/plotting.py +0 -257
  52. polars/datatype_expr/__init__.py +0 -5
  53. polars/datatype_expr/array.py +0 -56
  54. polars/datatype_expr/datatype_expr.py +0 -304
  55. polars/datatype_expr/list.py +0 -18
  56. polars/datatype_expr/struct.py +0 -69
  57. polars/datatypes/__init__.py +0 -122
  58. polars/datatypes/_parse.py +0 -195
  59. polars/datatypes/_utils.py +0 -48
  60. polars/datatypes/classes.py +0 -1213
  61. polars/datatypes/constants.py +0 -11
  62. polars/datatypes/constructor.py +0 -172
  63. polars/datatypes/convert.py +0 -366
  64. polars/datatypes/group.py +0 -130
  65. polars/exceptions.py +0 -230
  66. polars/expr/__init__.py +0 -7
  67. polars/expr/array.py +0 -964
  68. polars/expr/binary.py +0 -346
  69. polars/expr/categorical.py +0 -306
  70. polars/expr/datetime.py +0 -2620
  71. polars/expr/expr.py +0 -11272
  72. polars/expr/list.py +0 -1408
  73. polars/expr/meta.py +0 -444
  74. polars/expr/name.py +0 -321
  75. polars/expr/string.py +0 -3045
  76. polars/expr/struct.py +0 -357
  77. polars/expr/whenthen.py +0 -185
  78. polars/functions/__init__.py +0 -193
  79. polars/functions/aggregation/__init__.py +0 -33
  80. polars/functions/aggregation/horizontal.py +0 -298
  81. polars/functions/aggregation/vertical.py +0 -341
  82. polars/functions/as_datatype.py +0 -848
  83. polars/functions/business.py +0 -138
  84. polars/functions/col.py +0 -384
  85. polars/functions/datatype.py +0 -121
  86. polars/functions/eager.py +0 -524
  87. polars/functions/escape_regex.py +0 -29
  88. polars/functions/lazy.py +0 -2751
  89. polars/functions/len.py +0 -68
  90. polars/functions/lit.py +0 -210
  91. polars/functions/random.py +0 -22
  92. polars/functions/range/__init__.py +0 -19
  93. polars/functions/range/_utils.py +0 -15
  94. polars/functions/range/date_range.py +0 -303
  95. polars/functions/range/datetime_range.py +0 -370
  96. polars/functions/range/int_range.py +0 -348
  97. polars/functions/range/linear_space.py +0 -311
  98. polars/functions/range/time_range.py +0 -287
  99. polars/functions/repeat.py +0 -301
  100. polars/functions/whenthen.py +0 -353
  101. polars/interchange/__init__.py +0 -10
  102. polars/interchange/buffer.py +0 -77
  103. polars/interchange/column.py +0 -190
  104. polars/interchange/dataframe.py +0 -230
  105. polars/interchange/from_dataframe.py +0 -328
  106. polars/interchange/protocol.py +0 -303
  107. polars/interchange/utils.py +0 -170
  108. polars/io/__init__.py +0 -64
  109. polars/io/_utils.py +0 -317
  110. polars/io/avro.py +0 -49
  111. polars/io/clipboard.py +0 -36
  112. polars/io/cloud/__init__.py +0 -17
  113. polars/io/cloud/_utils.py +0 -80
  114. polars/io/cloud/credential_provider/__init__.py +0 -17
  115. polars/io/cloud/credential_provider/_builder.py +0 -520
  116. polars/io/cloud/credential_provider/_providers.py +0 -618
  117. polars/io/csv/__init__.py +0 -9
  118. polars/io/csv/_utils.py +0 -38
  119. polars/io/csv/batched_reader.py +0 -142
  120. polars/io/csv/functions.py +0 -1495
  121. polars/io/database/__init__.py +0 -6
  122. polars/io/database/_arrow_registry.py +0 -70
  123. polars/io/database/_cursor_proxies.py +0 -147
  124. polars/io/database/_executor.py +0 -578
  125. polars/io/database/_inference.py +0 -314
  126. polars/io/database/_utils.py +0 -144
  127. polars/io/database/functions.py +0 -516
  128. polars/io/delta.py +0 -499
  129. polars/io/iceberg/__init__.py +0 -3
  130. polars/io/iceberg/_utils.py +0 -697
  131. polars/io/iceberg/dataset.py +0 -556
  132. polars/io/iceberg/functions.py +0 -151
  133. polars/io/ipc/__init__.py +0 -8
  134. polars/io/ipc/functions.py +0 -514
  135. polars/io/json/__init__.py +0 -3
  136. polars/io/json/read.py +0 -101
  137. polars/io/ndjson.py +0 -332
  138. polars/io/parquet/__init__.py +0 -17
  139. polars/io/parquet/field_overwrites.py +0 -140
  140. polars/io/parquet/functions.py +0 -722
  141. polars/io/partition.py +0 -491
  142. polars/io/plugins.py +0 -187
  143. polars/io/pyarrow_dataset/__init__.py +0 -5
  144. polars/io/pyarrow_dataset/anonymous_scan.py +0 -109
  145. polars/io/pyarrow_dataset/functions.py +0 -79
  146. polars/io/scan_options/__init__.py +0 -5
  147. polars/io/scan_options/_options.py +0 -59
  148. polars/io/scan_options/cast_options.py +0 -126
  149. polars/io/spreadsheet/__init__.py +0 -6
  150. polars/io/spreadsheet/_utils.py +0 -52
  151. polars/io/spreadsheet/_write_utils.py +0 -647
  152. polars/io/spreadsheet/functions.py +0 -1323
  153. polars/lazyframe/__init__.py +0 -9
  154. polars/lazyframe/engine_config.py +0 -61
  155. polars/lazyframe/frame.py +0 -8564
  156. polars/lazyframe/group_by.py +0 -669
  157. polars/lazyframe/in_process.py +0 -42
  158. polars/lazyframe/opt_flags.py +0 -333
  159. polars/meta/__init__.py +0 -14
  160. polars/meta/build.py +0 -33
  161. polars/meta/index_type.py +0 -27
  162. polars/meta/thread_pool.py +0 -50
  163. polars/meta/versions.py +0 -120
  164. polars/ml/__init__.py +0 -0
  165. polars/ml/torch.py +0 -213
  166. polars/ml/utilities.py +0 -30
  167. polars/plugins.py +0 -155
  168. polars/py.typed +0 -0
  169. polars/pyproject.toml +0 -103
  170. polars/schema.py +0 -265
  171. polars/selectors.py +0 -3117
  172. polars/series/__init__.py +0 -5
  173. polars/series/array.py +0 -776
  174. polars/series/binary.py +0 -254
  175. polars/series/categorical.py +0 -246
  176. polars/series/datetime.py +0 -2275
  177. polars/series/list.py +0 -1087
  178. polars/series/plotting.py +0 -191
  179. polars/series/series.py +0 -9197
  180. polars/series/string.py +0 -2367
  181. polars/series/struct.py +0 -154
  182. polars/series/utils.py +0 -191
  183. polars/sql/__init__.py +0 -7
  184. polars/sql/context.py +0 -677
  185. polars/sql/functions.py +0 -139
  186. polars/string_cache.py +0 -185
  187. polars/testing/__init__.py +0 -13
  188. polars/testing/asserts/__init__.py +0 -9
  189. polars/testing/asserts/frame.py +0 -231
  190. polars/testing/asserts/series.py +0 -219
  191. polars/testing/asserts/utils.py +0 -12
  192. polars/testing/parametric/__init__.py +0 -33
  193. polars/testing/parametric/profiles.py +0 -107
  194. polars/testing/parametric/strategies/__init__.py +0 -22
  195. polars/testing/parametric/strategies/_utils.py +0 -14
  196. polars/testing/parametric/strategies/core.py +0 -615
  197. polars/testing/parametric/strategies/data.py +0 -452
  198. polars/testing/parametric/strategies/dtype.py +0 -436
  199. polars/testing/parametric/strategies/legacy.py +0 -169
  200. polars/type_aliases.py +0 -24
  201. polars_runtime_compat-1.34.0b3.dist-info/METADATA +0 -190
  202. polars_runtime_compat-1.34.0b3.dist-info/RECORD +0 -203
  203. {polars_runtime_compat-1.34.0b3.dist-info → polars_runtime_compat-1.34.0b5.dist-info}/WHEEL +0 -0
  204. {polars_runtime_compat-1.34.0b3.dist-info → polars_runtime_compat-1.34.0b5.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,35 @@
1
+ Metadata-Version: 2.4
2
+ Name: polars-runtime-compat
3
+ Version: 1.34.0b5
4
+ Classifier: Development Status :: 5 - Production/Stable
5
+ Classifier: Environment :: Console
6
+ Classifier: Intended Audience :: Science/Research
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Rust
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Classifier: Typing :: Typed
20
+ License-File: LICENSE
21
+ Summary: Blazingly fast DataFrame library
22
+ Keywords: dataframe,arrow,out-of-core
23
+ Author-email: Ritchie Vink <ritchie46@gmail.com>
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
26
+ Project-URL: Homepage, https://www.pola.rs/
27
+ Project-URL: Documentation, https://docs.pola.rs/api/python/stable/reference/index.html
28
+ Project-URL: Repository, https://github.com/pola-rs/polars
29
+ Project-URL: Changelog, https://github.com/pola-rs/polars/releases
30
+
31
+ # Polars Runtime
32
+
33
+ Packages that contain the binary shared libraries that back the polars python package. Not meant for
34
+ general consumption and just meant as dependencies for the polars main package.
35
+
@@ -0,0 +1,6 @@
1
+ polars_runtime_compat-1.34.0b5.dist-info/METADATA,sha256=FbbhyWJRlTWwNJ3eSEf4mr8J2Zr3SBZWGbLTd14fXxc,1522
2
+ polars_runtime_compat-1.34.0b5.dist-info/WHEEL,sha256=zpDnIg4eg1Idc7MVax1ZoYYMIaNdLx57T0NNDaoqi9M,107
3
+ polars_runtime_compat-1.34.0b5.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=jGw7mAMpI0nfzmyj8dzAvOqYdLaxcfq4vvy8SXT_28g,118214432
6
+ polars_runtime_compat-1.34.0b5.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)