polars-df 0.10.0-aarch64-linux → 0.12.0-aarch64-linux
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/Cargo.lock +392 -351
- data/LICENSE-THIRD-PARTY.txt +1125 -865
- data/README.md +6 -6
- data/lib/polars/3.1/polars.so +0 -0
- data/lib/polars/3.2/polars.so +0 -0
- data/lib/polars/3.3/polars.so +0 -0
- data/lib/polars/array_expr.rb +4 -4
- data/lib/polars/batched_csv_reader.rb +11 -5
- data/lib/polars/cat_expr.rb +0 -36
- data/lib/polars/cat_name_space.rb +0 -37
- data/lib/polars/convert.rb +6 -1
- data/lib/polars/data_frame.rb +176 -403
- data/lib/polars/data_types.rb +1 -1
- data/lib/polars/date_time_expr.rb +525 -572
- data/lib/polars/date_time_name_space.rb +263 -460
- data/lib/polars/dynamic_group_by.rb +5 -5
- data/lib/polars/exceptions.rb +7 -0
- data/lib/polars/expr.rb +1394 -243
- data/lib/polars/expr_dispatch.rb +1 -1
- data/lib/polars/functions/aggregation/horizontal.rb +8 -8
- data/lib/polars/functions/as_datatype.rb +63 -40
- data/lib/polars/functions/lazy.rb +63 -14
- data/lib/polars/functions/lit.rb +1 -1
- data/lib/polars/functions/range/date_range.rb +90 -57
- data/lib/polars/functions/range/datetime_range.rb +149 -0
- data/lib/polars/functions/range/int_range.rb +2 -2
- data/lib/polars/functions/range/time_range.rb +141 -0
- data/lib/polars/functions/repeat.rb +1 -1
- data/lib/polars/functions/whenthen.rb +1 -1
- data/lib/polars/group_by.rb +88 -23
- data/lib/polars/io/avro.rb +24 -0
- data/lib/polars/{io.rb → io/csv.rb} +299 -493
- data/lib/polars/io/database.rb +73 -0
- data/lib/polars/io/ipc.rb +247 -0
- data/lib/polars/io/json.rb +29 -0
- data/lib/polars/io/ndjson.rb +80 -0
- data/lib/polars/io/parquet.rb +227 -0
- data/lib/polars/lazy_frame.rb +143 -272
- data/lib/polars/lazy_group_by.rb +100 -3
- data/lib/polars/list_expr.rb +11 -11
- data/lib/polars/list_name_space.rb +5 -1
- data/lib/polars/rolling_group_by.rb +7 -9
- data/lib/polars/series.rb +103 -187
- data/lib/polars/string_expr.rb +78 -102
- data/lib/polars/string_name_space.rb +5 -4
- data/lib/polars/testing.rb +2 -2
- data/lib/polars/utils/constants.rb +9 -0
- data/lib/polars/utils/convert.rb +97 -0
- data/lib/polars/utils/parse.rb +89 -0
- data/lib/polars/utils/various.rb +76 -0
- data/lib/polars/utils/wrap.rb +19 -0
- data/lib/polars/utils.rb +8 -300
- data/lib/polars/version.rb +1 -1
- data/lib/polars/whenthen.rb +6 -6
- data/lib/polars.rb +20 -1
- metadata +17 -4
@@ -16,9 +16,9 @@ module Polars
|
|
16
16
|
by,
|
17
17
|
start_by
|
18
18
|
)
|
19
|
-
period = Utils.
|
20
|
-
offset = Utils.
|
21
|
-
every = Utils.
|
19
|
+
period = Utils.parse_as_duration_string(period)
|
20
|
+
offset = Utils.parse_as_duration_string(offset)
|
21
|
+
every = Utils.parse_as_duration_string(every)
|
22
22
|
|
23
23
|
@df = df
|
24
24
|
@time_column = index_column
|
@@ -32,7 +32,7 @@ module Polars
|
|
32
32
|
@start_by = start_by
|
33
33
|
end
|
34
34
|
|
35
|
-
def agg(aggs)
|
35
|
+
def agg(*aggs, **named_aggs)
|
36
36
|
@df.lazy
|
37
37
|
.group_by_dynamic(
|
38
38
|
@time_column,
|
@@ -45,7 +45,7 @@ module Polars
|
|
45
45
|
by: @by,
|
46
46
|
start_by: @start_by
|
47
47
|
)
|
48
|
-
.agg(aggs)
|
48
|
+
.agg(*aggs, **named_aggs)
|
49
49
|
.collect(no_optimization: true, string_cache: false)
|
50
50
|
end
|
51
51
|
end
|
data/lib/polars/exceptions.rb
CHANGED
@@ -3,6 +3,10 @@ module Polars
|
|
3
3
|
# Base class for all Polars errors.
|
4
4
|
class Error < StandardError; end
|
5
5
|
|
6
|
+
# @private
|
7
|
+
# Exception raised when an operation is not allowed (or possible) against a given object or data structure.
|
8
|
+
class InvalidOperationError < Error; end
|
9
|
+
|
6
10
|
# @private
|
7
11
|
# Exception raised when an unsupported testing assert is made.
|
8
12
|
class InvalidAssert < Error; end
|
@@ -22,6 +26,9 @@ module Polars
|
|
22
26
|
# @private
|
23
27
|
class AssertionError < Error; end
|
24
28
|
|
29
|
+
# @private
|
30
|
+
class ComputeError < Error; end
|
31
|
+
|
25
32
|
# @private
|
26
33
|
class Todo < Error
|
27
34
|
def message
|