polars-df 0.2.5 → 0.3.0
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 +8 -0
- data/Cargo.lock +290 -137
- data/Cargo.toml +1 -1
- data/ext/polars/Cargo.toml +5 -4
- data/ext/polars/src/apply/dataframe.rs +6 -6
- data/ext/polars/src/apply/series.rs +10 -10
- data/ext/polars/src/batched_csv.rs +6 -4
- data/ext/polars/src/conversion.rs +40 -13
- data/ext/polars/src/dataframe.rs +45 -43
- data/ext/polars/src/error.rs +8 -8
- data/ext/polars/src/file.rs +5 -4
- data/ext/polars/src/lazy/apply.rs +1 -1
- data/ext/polars/src/lazy/dataframe.rs +12 -6
- data/ext/polars/src/lazy/dsl.rs +99 -45
- data/ext/polars/src/lazy/meta.rs +10 -9
- data/ext/polars/src/lib.rs +28 -29
- data/ext/polars/src/object.rs +2 -1
- data/ext/polars/src/series.rs +23 -21
- data/lib/polars/cat_expr.rb +0 -4
- data/lib/polars/cat_name_space.rb +0 -4
- data/lib/polars/convert.rb +0 -7
- data/lib/polars/data_frame.rb +139 -204
- data/lib/polars/date_time_expr.rb +19 -151
- data/lib/polars/date_time_name_space.rb +17 -17
- data/lib/polars/expr.rb +68 -315
- data/lib/polars/group_by.rb +68 -51
- data/lib/polars/io.rb +1 -1
- data/lib/polars/lazy_frame.rb +1 -103
- data/lib/polars/lazy_functions.rb +0 -26
- data/lib/polars/lazy_group_by.rb +0 -8
- data/lib/polars/list_expr.rb +5 -27
- data/lib/polars/list_name_space.rb +5 -8
- data/lib/polars/series.rb +20 -16
- data/lib/polars/string_expr.rb +20 -76
- data/lib/polars/string_name_space.rb +5 -15
- data/lib/polars/struct_expr.rb +0 -2
- data/lib/polars/version.rb +1 -1
- metadata +3 -3
@@ -53,14 +53,11 @@ module Polars
|
|
53
53
|
# # │ date │
|
54
54
|
# # ╞════════════╡
|
55
55
|
# # │ 2021-04-22 │
|
56
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┤
|
57
56
|
# # │ 2022-01-04 │
|
58
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┤
|
59
57
|
# # │ 2022-01-31 │
|
60
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┤
|
61
58
|
# # │ 2001-07-08 │
|
62
59
|
# # └────────────┘
|
63
|
-
def strptime(datatype, fmt = nil, strict: true, exact: true, cache: true, tz_aware: false)
|
60
|
+
def strptime(datatype, fmt = nil, strict: true, exact: true, cache: true, tz_aware: false, utc: false)
|
64
61
|
super
|
65
62
|
end
|
66
63
|
|
@@ -224,10 +221,10 @@ module Polars
|
|
224
221
|
# s.str.decode("hex")
|
225
222
|
# # =>
|
226
223
|
# # shape: (3,)
|
227
|
-
# # Series: '' [
|
224
|
+
# # Series: '' [binary]
|
228
225
|
# # [
|
229
|
-
# #
|
230
|
-
# #
|
226
|
+
# # [binary data]
|
227
|
+
# # [binary data]
|
231
228
|
# # null
|
232
229
|
# # ]
|
233
230
|
def decode(encoding, strict: false)
|
@@ -310,7 +307,6 @@ module Polars
|
|
310
307
|
# # │ str │
|
311
308
|
# # ╞═════╡
|
312
309
|
# # │ 123 │
|
313
|
-
# # ├╌╌╌╌╌┤
|
314
310
|
# # │ 678 │
|
315
311
|
# # └─────┘
|
316
312
|
def extract(pattern, group_index: 1)
|
@@ -332,7 +328,7 @@ module Polars
|
|
332
328
|
# s.str.extract_all('(\d+)')
|
333
329
|
# # =>
|
334
330
|
# # shape: (2,)
|
335
|
-
# # Series: 'foo' [list]
|
331
|
+
# # Series: 'foo' [list[str]]
|
336
332
|
# # [
|
337
333
|
# # ["123", "45"]
|
338
334
|
# # ["678", "910"]
|
@@ -417,11 +413,8 @@ module Polars
|
|
417
413
|
# # │ str ┆ str │
|
418
414
|
# # ╞════════════╪═════════════╡
|
419
415
|
# # │ a ┆ 1 │
|
420
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
|
421
416
|
# # │ null ┆ null │
|
422
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
|
423
417
|
# # │ c ┆ null │
|
424
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
|
425
418
|
# # │ d ┆ 4 │
|
426
419
|
# # └────────────┴─────────────┘
|
427
420
|
def split_exact(by, n, inclusive: false)
|
@@ -469,11 +462,8 @@ module Polars
|
|
469
462
|
# # │ str ┆ str │
|
470
463
|
# # ╞════════════╪═════════════╡
|
471
464
|
# # │ foo ┆ bar │
|
472
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
|
473
465
|
# # │ null ┆ null │
|
474
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
|
475
466
|
# # │ foo-bar ┆ null │
|
476
|
-
# # ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤
|
477
467
|
# # │ foo ┆ bar baz │
|
478
468
|
# # └────────────┴─────────────┘
|
479
469
|
def splitn(by, n)
|
data/lib/polars/struct_expr.rb
CHANGED
@@ -51,7 +51,6 @@ module Polars
|
|
51
51
|
# # │ str │
|
52
52
|
# # ╞═════╡
|
53
53
|
# # │ a │
|
54
|
-
# # ├╌╌╌╌╌┤
|
55
54
|
# # │ b │
|
56
55
|
# # └─────┘
|
57
56
|
def field(name)
|
@@ -90,7 +89,6 @@ module Polars
|
|
90
89
|
# # │ i64 │
|
91
90
|
# # ╞═════╡
|
92
91
|
# # │ 1 │
|
93
|
-
# # ├╌╌╌╌╌┤
|
94
92
|
# # │ 2 │
|
95
93
|
# # └─────┘
|
96
94
|
def rename_fields(names)
|
data/lib/polars/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polars-df
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
|
-
rubygems_version: 3.4.
|
117
|
+
rubygems_version: 3.4.6
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Blazingly fast DataFrames for Ruby
|