polars-df 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -1
- data/Cargo.lock +107 -59
- data/Cargo.toml +0 -3
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/ext/polars/Cargo.toml +15 -7
- data/ext/polars/src/batched_csv.rs +4 -4
- data/ext/polars/src/conversion/anyvalue.rs +185 -0
- data/ext/polars/src/conversion/chunked_array.rs +140 -0
- data/ext/polars/src/{conversion.rs → conversion/mod.rs} +260 -340
- data/ext/polars/src/dataframe.rs +69 -53
- data/ext/polars/src/expr/array.rs +74 -0
- data/ext/polars/src/expr/datetime.rs +22 -56
- data/ext/polars/src/expr/general.rs +61 -33
- data/ext/polars/src/expr/list.rs +52 -4
- data/ext/polars/src/expr/meta.rs +48 -0
- data/ext/polars/src/expr/rolling.rs +1 -0
- data/ext/polars/src/expr/string.rs +59 -8
- data/ext/polars/src/expr/struct.rs +8 -4
- data/ext/polars/src/functions/aggregation.rs +6 -0
- data/ext/polars/src/functions/lazy.rs +103 -48
- data/ext/polars/src/functions/meta.rs +45 -1
- data/ext/polars/src/functions/string_cache.rs +14 -0
- data/ext/polars/src/{lazyframe.rs → lazyframe/mod.rs} +138 -22
- data/ext/polars/src/lib.rs +226 -168
- data/ext/polars/src/series/aggregation.rs +20 -0
- data/ext/polars/src/series/mod.rs +25 -4
- data/lib/polars/array_expr.rb +449 -0
- data/lib/polars/array_name_space.rb +346 -0
- data/lib/polars/cat_expr.rb +24 -0
- data/lib/polars/cat_name_space.rb +75 -0
- data/lib/polars/config.rb +2 -2
- data/lib/polars/data_frame.rb +179 -43
- data/lib/polars/data_types.rb +191 -28
- data/lib/polars/date_time_expr.rb +31 -14
- data/lib/polars/exceptions.rb +12 -1
- data/lib/polars/expr.rb +866 -186
- data/lib/polars/functions/aggregation/horizontal.rb +246 -0
- data/lib/polars/functions/aggregation/vertical.rb +282 -0
- data/lib/polars/functions/as_datatype.rb +248 -0
- data/lib/polars/functions/col.rb +47 -0
- data/lib/polars/functions/eager.rb +182 -0
- data/lib/polars/functions/lazy.rb +1280 -0
- data/lib/polars/functions/len.rb +49 -0
- data/lib/polars/functions/lit.rb +35 -0
- data/lib/polars/functions/random.rb +16 -0
- data/lib/polars/functions/range/date_range.rb +103 -0
- data/lib/polars/functions/range/int_range.rb +51 -0
- data/lib/polars/functions/repeat.rb +144 -0
- data/lib/polars/functions/whenthen.rb +27 -0
- data/lib/polars/functions.rb +29 -416
- data/lib/polars/group_by.rb +2 -2
- data/lib/polars/io.rb +18 -25
- data/lib/polars/lazy_frame.rb +367 -53
- data/lib/polars/list_expr.rb +152 -6
- data/lib/polars/list_name_space.rb +102 -0
- data/lib/polars/meta_expr.rb +175 -7
- data/lib/polars/series.rb +273 -34
- data/lib/polars/string_cache.rb +75 -0
- data/lib/polars/string_expr.rb +412 -96
- data/lib/polars/string_name_space.rb +4 -4
- data/lib/polars/testing.rb +507 -0
- data/lib/polars/utils.rb +52 -8
- data/lib/polars/version.rb +1 -1
- data/lib/polars.rb +15 -2
- metadata +35 -5
- data/lib/polars/lazy_functions.rb +0 -1181
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6852d4e91c063866f1a64c32607e62f536c1faa5730c57f278632b41d418614
|
4
|
+
data.tar.gz: 3c3aef0366fb2e182826a6fc70b5b278974cd71ce9a968ea2faf7dd6c3324a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ce8f3a7c5e5f01d673361a5cd070dbdd675099794cebdd12c29dc5e5963b2b7d0798f432f32e917ed5d77eb2ffe9f5def99d9dbd616b04a45e5483d562c49e1
|
7
|
+
data.tar.gz: f69de773948caf4dcf48a59f52c881ae71b1a2a45f16aad65bc8aea0c4b4c31b2603a02907b62718d8f345dcb85ba1ec46abc2d3356cd2603c16a26cac596f60
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,33 @@
|
|
1
|
-
## 0.
|
1
|
+
## 0.9.0 (2024-03-03)
|
2
|
+
|
3
|
+
See the [upgrade guide](https://docs.pola.rs/releases/upgrade/0.20/)
|
4
|
+
|
5
|
+
- Updated Polars to 0.38.1
|
6
|
+
- Changed `count` method to exclude null values
|
7
|
+
- Changed `dtype` and `schema` methods to always return instances of data types
|
8
|
+
- Added `Enum` type
|
9
|
+
- Added `Testing` module
|
10
|
+
- Added `arctan2`, `arctan2d`, `set_random_seed`, and `sql_expr` methods to `Polars`
|
11
|
+
- Added `enable_string_cache`, `disable_string_cache`, and `using_string_cache` to `Polars`
|
12
|
+
- Added methods for horizontal aggregations to `Polars`
|
13
|
+
- Added `sink_ipc`, `sink_csv`, and `sink_ndjson` methods to `LazyFrame`
|
14
|
+
- Added `replace` method to `Series` and `Expr`
|
15
|
+
- Added `eq`, `eq_missing`, `ne`, and `ne_missing` methods to `Series` and `Expr`
|
16
|
+
- Added `ge`, `gt`, `le`, and `lt` methods to `Series` and `Expr`
|
17
|
+
- Added `merge_sorted` method to `DataFrame` and `LazyFrame`
|
18
|
+
- Added more methods to `ArrayExpr` and `ArrayNameSpace`
|
19
|
+
- Added more methods to `CatExpr` and `CatNameSpace`
|
20
|
+
- Added more methods to `ListExpr` and `ListNameSpace`
|
21
|
+
- Added more methods to `MetaExpr`
|
22
|
+
- Added more methods to `StringExpr`
|
23
|
+
- Added `schema_overrides` option to `read_database` method
|
24
|
+
- Added `join_nulls` option to `join` method
|
25
|
+
- Added `ignore_nulls` option to `any` and `all` methods
|
26
|
+
- Aliased `apply` to `map_elements` for `Series`
|
27
|
+
- Aliased `cleared` to `clear` for `DataFrame` and `LazyFrame`
|
28
|
+
- Fixed error with `BigDecimal` objects
|
29
|
+
|
30
|
+
## 0.8.0 (2024-01-10)
|
2
31
|
|
3
32
|
- Updated Polars to 0.36.2
|
4
33
|
- Added support for Ruby 3.3
|
data/Cargo.lock
CHANGED
@@ -96,16 +96,6 @@ version = "0.2.0"
|
|
96
96
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
97
97
|
checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76"
|
98
98
|
|
99
|
-
[[package]]
|
100
|
-
name = "arrow-format"
|
101
|
-
version = "0.8.1"
|
102
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
103
|
-
checksum = "07884ea216994cdc32a2d5f8274a8bee979cfe90274b83f86f440866ee3132c7"
|
104
|
-
dependencies = [
|
105
|
-
"planus",
|
106
|
-
"serde",
|
107
|
-
]
|
108
|
-
|
109
99
|
[[package]]
|
110
100
|
name = "async-stream"
|
111
101
|
version = "0.3.5"
|
@@ -800,9 +790,10 @@ dependencies = [
|
|
800
790
|
]
|
801
791
|
|
802
792
|
[[package]]
|
803
|
-
name = "
|
804
|
-
version = "0.
|
805
|
-
source = "
|
793
|
+
name = "jsonpath_lib_polars_vendor"
|
794
|
+
version = "0.0.1"
|
795
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
796
|
+
checksum = "f4bd9354947622f7471ff713eacaabdb683ccb13bba4edccaab9860abf480b7d"
|
806
797
|
dependencies = [
|
807
798
|
"log",
|
808
799
|
"serde",
|
@@ -1252,7 +1243,7 @@ dependencies = [
|
|
1252
1243
|
|
1253
1244
|
[[package]]
|
1254
1245
|
name = "polars"
|
1255
|
-
version = "0.
|
1246
|
+
version = "0.9.0"
|
1256
1247
|
dependencies = [
|
1257
1248
|
"ahash",
|
1258
1249
|
"chrono",
|
@@ -1260,7 +1251,7 @@ dependencies = [
|
|
1260
1251
|
"jemallocator",
|
1261
1252
|
"magnus",
|
1262
1253
|
"mimalloc",
|
1263
|
-
"polars 0.
|
1254
|
+
"polars 0.38.1",
|
1264
1255
|
"polars-core",
|
1265
1256
|
"polars-parquet",
|
1266
1257
|
"polars-utils",
|
@@ -1270,28 +1261,32 @@ dependencies = [
|
|
1270
1261
|
|
1271
1262
|
[[package]]
|
1272
1263
|
name = "polars"
|
1273
|
-
version = "0.
|
1264
|
+
version = "0.38.1"
|
1274
1265
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1275
|
-
checksum = "
|
1266
|
+
checksum = "3a26ef94cfedd5915da990a0b4740cca17b5854bd44a8e8c741fe732c02aac37"
|
1276
1267
|
dependencies = [
|
1277
1268
|
"getrandom",
|
1269
|
+
"polars-arrow",
|
1278
1270
|
"polars-core",
|
1271
|
+
"polars-error",
|
1279
1272
|
"polars-io",
|
1280
1273
|
"polars-lazy",
|
1281
1274
|
"polars-ops",
|
1275
|
+
"polars-parquet",
|
1276
|
+
"polars-plan",
|
1282
1277
|
"polars-sql",
|
1283
1278
|
"polars-time",
|
1279
|
+
"polars-utils",
|
1284
1280
|
"version_check",
|
1285
1281
|
]
|
1286
1282
|
|
1287
1283
|
[[package]]
|
1288
1284
|
name = "polars-arrow"
|
1289
|
-
version = "0.
|
1285
|
+
version = "0.38.1"
|
1290
1286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1291
|
-
checksum = "
|
1287
|
+
checksum = "48e71d30a9fa503bc3baaff3b4c48f08d402c442a50ea7fb9d475ce7b575425a"
|
1292
1288
|
dependencies = [
|
1293
1289
|
"ahash",
|
1294
|
-
"arrow-format",
|
1295
1290
|
"atoi",
|
1296
1291
|
"atoi_simd",
|
1297
1292
|
"avro-schema",
|
@@ -1307,9 +1302,11 @@ dependencies = [
|
|
1307
1302
|
"getrandom",
|
1308
1303
|
"hashbrown 0.14.3",
|
1309
1304
|
"itoa",
|
1305
|
+
"itoap",
|
1310
1306
|
"lz4",
|
1311
1307
|
"multiversion",
|
1312
1308
|
"num-traits",
|
1309
|
+
"polars-arrow-format",
|
1313
1310
|
"polars-error",
|
1314
1311
|
"polars-utils",
|
1315
1312
|
"ryu",
|
@@ -1321,24 +1318,37 @@ dependencies = [
|
|
1321
1318
|
"zstd",
|
1322
1319
|
]
|
1323
1320
|
|
1321
|
+
[[package]]
|
1322
|
+
name = "polars-arrow-format"
|
1323
|
+
version = "0.1.0"
|
1324
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1325
|
+
checksum = "19b0ef2474af9396b19025b189d96e992311e6a47f90c53cd998b36c4c64b84c"
|
1326
|
+
dependencies = [
|
1327
|
+
"planus",
|
1328
|
+
"serde",
|
1329
|
+
]
|
1330
|
+
|
1324
1331
|
[[package]]
|
1325
1332
|
name = "polars-compute"
|
1326
|
-
version = "0.
|
1333
|
+
version = "0.38.1"
|
1327
1334
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1328
|
-
checksum = "
|
1335
|
+
checksum = "26342dea46502e8a3322f484062869c2fa49185d512bce4fb44f350b559b4eae"
|
1329
1336
|
dependencies = [
|
1330
1337
|
"bytemuck",
|
1338
|
+
"either",
|
1331
1339
|
"num-traits",
|
1332
1340
|
"polars-arrow",
|
1341
|
+
"polars-error",
|
1333
1342
|
"polars-utils",
|
1343
|
+
"strength_reduce",
|
1334
1344
|
"version_check",
|
1335
1345
|
]
|
1336
1346
|
|
1337
1347
|
[[package]]
|
1338
1348
|
name = "polars-core"
|
1339
|
-
version = "0.
|
1349
|
+
version = "0.38.1"
|
1340
1350
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1341
|
-
checksum = "
|
1351
|
+
checksum = "99e0885a8f1bd1f4d928f5eaa852825bf647b6b5e21e171b6af838f77b6565f3"
|
1342
1352
|
dependencies = [
|
1343
1353
|
"ahash",
|
1344
1354
|
"bitflags 2.4.1",
|
@@ -1349,7 +1359,6 @@ dependencies = [
|
|
1349
1359
|
"either",
|
1350
1360
|
"hashbrown 0.14.3",
|
1351
1361
|
"indexmap",
|
1352
|
-
"itoap",
|
1353
1362
|
"num-traits",
|
1354
1363
|
"once_cell",
|
1355
1364
|
"polars-arrow",
|
@@ -1371,12 +1380,12 @@ dependencies = [
|
|
1371
1380
|
|
1372
1381
|
[[package]]
|
1373
1382
|
name = "polars-error"
|
1374
|
-
version = "0.
|
1383
|
+
version = "0.38.1"
|
1375
1384
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1376
|
-
checksum = "
|
1385
|
+
checksum = "d259d905c17d8e8b2de1eadc94dc4186bf1d325f1be81b4087afea22a6f753d6"
|
1377
1386
|
dependencies = [
|
1378
|
-
"arrow-format",
|
1379
1387
|
"avro-schema",
|
1388
|
+
"polars-arrow-format",
|
1380
1389
|
"regex",
|
1381
1390
|
"simdutf8",
|
1382
1391
|
"thiserror",
|
@@ -1384,9 +1393,9 @@ dependencies = [
|
|
1384
1393
|
|
1385
1394
|
[[package]]
|
1386
1395
|
name = "polars-io"
|
1387
|
-
version = "0.
|
1396
|
+
version = "0.38.1"
|
1388
1397
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1389
|
-
checksum = "
|
1398
|
+
checksum = "45f694b918ba2ee7e6f13e8415598f94009c390a9e61c95e6b9c26c8fe1a1a54"
|
1390
1399
|
dependencies = [
|
1391
1400
|
"ahash",
|
1392
1401
|
"async-trait",
|
@@ -1424,9 +1433,9 @@ dependencies = [
|
|
1424
1433
|
|
1425
1434
|
[[package]]
|
1426
1435
|
name = "polars-json"
|
1427
|
-
version = "0.
|
1436
|
+
version = "0.38.1"
|
1428
1437
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1429
|
-
checksum = "
|
1438
|
+
checksum = "fd7c4d33540a22cd49ccb9b4da77999604ba986707d4568be57fde2f719954ae"
|
1430
1439
|
dependencies = [
|
1431
1440
|
"ahash",
|
1432
1441
|
"chrono",
|
@@ -1445,9 +1454,9 @@ dependencies = [
|
|
1445
1454
|
|
1446
1455
|
[[package]]
|
1447
1456
|
name = "polars-lazy"
|
1448
|
-
version = "0.
|
1457
|
+
version = "0.38.1"
|
1449
1458
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1450
|
-
checksum = "
|
1459
|
+
checksum = "56e3b40272d24142bcecb2979b19ec8d8c1a14036cb3cea09ce8fb8a4a43bcde"
|
1451
1460
|
dependencies = [
|
1452
1461
|
"ahash",
|
1453
1462
|
"bitflags 2.4.1",
|
@@ -1469,11 +1478,12 @@ dependencies = [
|
|
1469
1478
|
|
1470
1479
|
[[package]]
|
1471
1480
|
name = "polars-ops"
|
1472
|
-
version = "0.
|
1481
|
+
version = "0.38.1"
|
1473
1482
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1474
|
-
checksum = "
|
1483
|
+
checksum = "cd5bad61c2fa1977eb65bb719f12d4f68b908edf1106b91b3ab9615f9df8843e"
|
1475
1484
|
dependencies = [
|
1476
1485
|
"ahash",
|
1486
|
+
"aho-corasick",
|
1477
1487
|
"argminmax",
|
1478
1488
|
"base64",
|
1479
1489
|
"bytemuck",
|
@@ -1483,7 +1493,7 @@ dependencies = [
|
|
1483
1493
|
"hashbrown 0.14.3",
|
1484
1494
|
"hex",
|
1485
1495
|
"indexmap",
|
1486
|
-
"
|
1496
|
+
"jsonpath_lib_polars_vendor",
|
1487
1497
|
"memchr",
|
1488
1498
|
"num-traits",
|
1489
1499
|
"polars-arrow",
|
@@ -1499,14 +1509,15 @@ dependencies = [
|
|
1499
1509
|
"serde",
|
1500
1510
|
"serde_json",
|
1501
1511
|
"smartstring",
|
1512
|
+
"unicode-reverse",
|
1502
1513
|
"version_check",
|
1503
1514
|
]
|
1504
1515
|
|
1505
1516
|
[[package]]
|
1506
1517
|
name = "polars-parquet"
|
1507
|
-
version = "0.
|
1518
|
+
version = "0.38.1"
|
1508
1519
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1509
|
-
checksum = "
|
1520
|
+
checksum = "06d84fb9b005a19ca523406df371d9329466ae87df48922d0d3d8955072502a4"
|
1510
1521
|
dependencies = [
|
1511
1522
|
"ahash",
|
1512
1523
|
"async-stream",
|
@@ -1530,9 +1541,9 @@ dependencies = [
|
|
1530
1541
|
|
1531
1542
|
[[package]]
|
1532
1543
|
name = "polars-pipe"
|
1533
|
-
version = "0.
|
1544
|
+
version = "0.38.1"
|
1534
1545
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1535
|
-
checksum = "
|
1546
|
+
checksum = "58097bef7208a5b833c4d832d948026854917b4a219d55ab1779eb36b59fac0f"
|
1536
1547
|
dependencies = [
|
1537
1548
|
"crossbeam-channel",
|
1538
1549
|
"crossbeam-queue",
|
@@ -1549,14 +1560,15 @@ dependencies = [
|
|
1549
1560
|
"polars-utils",
|
1550
1561
|
"rayon",
|
1551
1562
|
"smartstring",
|
1563
|
+
"uuid",
|
1552
1564
|
"version_check",
|
1553
1565
|
]
|
1554
1566
|
|
1555
1567
|
[[package]]
|
1556
1568
|
name = "polars-plan"
|
1557
|
-
version = "0.
|
1569
|
+
version = "0.38.1"
|
1558
1570
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1559
|
-
checksum = "
|
1571
|
+
checksum = "56493c0e13aaccfcae59985db34da30cd4893e57edc9715d8688c96d7e911d47"
|
1560
1572
|
dependencies = [
|
1561
1573
|
"ahash",
|
1562
1574
|
"bytemuck",
|
@@ -1582,10 +1594,11 @@ dependencies = [
|
|
1582
1594
|
|
1583
1595
|
[[package]]
|
1584
1596
|
name = "polars-row"
|
1585
|
-
version = "0.
|
1597
|
+
version = "0.38.1"
|
1586
1598
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1587
|
-
checksum = "
|
1599
|
+
checksum = "7def6f9fc14fbfc0550bad615a757f3e1d86c00983c5ff23166fcdf205438d51"
|
1588
1600
|
dependencies = [
|
1601
|
+
"bytemuck",
|
1589
1602
|
"polars-arrow",
|
1590
1603
|
"polars-error",
|
1591
1604
|
"polars-utils",
|
@@ -1593,10 +1606,11 @@ dependencies = [
|
|
1593
1606
|
|
1594
1607
|
[[package]]
|
1595
1608
|
name = "polars-sql"
|
1596
|
-
version = "0.
|
1609
|
+
version = "0.38.1"
|
1597
1610
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1598
|
-
checksum = "
|
1611
|
+
checksum = "4f9d7de9dca8170a20b6c4cb7bafaf724abe88e807646bc3c2e98f13a34a7c4c"
|
1599
1612
|
dependencies = [
|
1613
|
+
"hex",
|
1600
1614
|
"polars-arrow",
|
1601
1615
|
"polars-core",
|
1602
1616
|
"polars-error",
|
@@ -1610,9 +1624,9 @@ dependencies = [
|
|
1610
1624
|
|
1611
1625
|
[[package]]
|
1612
1626
|
name = "polars-time"
|
1613
|
-
version = "0.
|
1627
|
+
version = "0.38.1"
|
1614
1628
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1615
|
-
checksum = "
|
1629
|
+
checksum = "162c815c3cb0f859da40f056c8a0a9c4247900e1275702ae399192ea60acac2a"
|
1616
1630
|
dependencies = [
|
1617
1631
|
"atoi",
|
1618
1632
|
"chrono",
|
@@ -1631,9 +1645,9 @@ dependencies = [
|
|
1631
1645
|
|
1632
1646
|
[[package]]
|
1633
1647
|
name = "polars-utils"
|
1634
|
-
version = "0.
|
1648
|
+
version = "0.38.1"
|
1635
1649
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1636
|
-
checksum = "
|
1650
|
+
checksum = "7fca7938ee789314ac92a0bf6c1c4e5eaeb5e428241df2519fd70f21dba49194"
|
1637
1651
|
dependencies = [
|
1638
1652
|
"ahash",
|
1639
1653
|
"bytemuck",
|
@@ -1642,6 +1656,7 @@ dependencies = [
|
|
1642
1656
|
"num-traits",
|
1643
1657
|
"once_cell",
|
1644
1658
|
"polars-error",
|
1659
|
+
"raw-cpuid",
|
1645
1660
|
"rayon",
|
1646
1661
|
"smartstring",
|
1647
1662
|
"sysinfo",
|
@@ -1712,11 +1727,20 @@ dependencies = [
|
|
1712
1727
|
"rand",
|
1713
1728
|
]
|
1714
1729
|
|
1730
|
+
[[package]]
|
1731
|
+
name = "raw-cpuid"
|
1732
|
+
version = "11.0.1"
|
1733
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1734
|
+
checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1"
|
1735
|
+
dependencies = [
|
1736
|
+
"bitflags 2.4.1",
|
1737
|
+
]
|
1738
|
+
|
1715
1739
|
[[package]]
|
1716
1740
|
name = "rayon"
|
1717
|
-
version = "1.
|
1741
|
+
version = "1.9.0"
|
1718
1742
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1719
|
-
checksum = "
|
1743
|
+
checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
|
1720
1744
|
dependencies = [
|
1721
1745
|
"either",
|
1722
1746
|
"rayon-core",
|
@@ -1724,9 +1748,9 @@ dependencies = [
|
|
1724
1748
|
|
1725
1749
|
[[package]]
|
1726
1750
|
name = "rayon-core"
|
1727
|
-
version = "1.12.
|
1751
|
+
version = "1.12.1"
|
1728
1752
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1729
|
-
checksum = "
|
1753
|
+
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
1730
1754
|
dependencies = [
|
1731
1755
|
"crossbeam-deque",
|
1732
1756
|
"crossbeam-utils",
|
@@ -1734,18 +1758,18 @@ dependencies = [
|
|
1734
1758
|
|
1735
1759
|
[[package]]
|
1736
1760
|
name = "rb-sys"
|
1737
|
-
version = "0.9.
|
1761
|
+
version = "0.9.90"
|
1738
1762
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1739
|
-
checksum = "
|
1763
|
+
checksum = "55d933382388cc7a6fdfd54e222eca7994791ac4b9ce5c9e8df280c739d86bbe"
|
1740
1764
|
dependencies = [
|
1741
1765
|
"rb-sys-build",
|
1742
1766
|
]
|
1743
1767
|
|
1744
1768
|
[[package]]
|
1745
1769
|
name = "rb-sys-build"
|
1746
|
-
version = "0.9.
|
1770
|
+
version = "0.9.90"
|
1747
1771
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1748
|
-
checksum = "
|
1772
|
+
checksum = "ebc5a7e3a875419baaa0d8cc606cdfb9361b444cb7e5abcf0de4693025887374"
|
1749
1773
|
dependencies = [
|
1750
1774
|
"bindgen",
|
1751
1775
|
"lazy_static",
|
@@ -2131,12 +2155,36 @@ version = "1.0.12"
|
|
2131
2155
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2132
2156
|
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
2133
2157
|
|
2158
|
+
[[package]]
|
2159
|
+
name = "unicode-reverse"
|
2160
|
+
version = "1.0.8"
|
2161
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2162
|
+
checksum = "0bea5dacebb0d2d0a69a6700a05b59b3908bf801bf563a49bd27a1b60122962c"
|
2163
|
+
dependencies = [
|
2164
|
+
"unicode-segmentation",
|
2165
|
+
]
|
2166
|
+
|
2167
|
+
[[package]]
|
2168
|
+
name = "unicode-segmentation"
|
2169
|
+
version = "1.10.1"
|
2170
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2171
|
+
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
2172
|
+
|
2134
2173
|
[[package]]
|
2135
2174
|
name = "unicode-width"
|
2136
2175
|
version = "0.1.11"
|
2137
2176
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2138
2177
|
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
|
2139
2178
|
|
2179
|
+
[[package]]
|
2180
|
+
name = "uuid"
|
2181
|
+
version = "1.7.0"
|
2182
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2183
|
+
checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
|
2184
|
+
dependencies = [
|
2185
|
+
"getrandom",
|
2186
|
+
]
|
2187
|
+
|
2140
2188
|
[[package]]
|
2141
2189
|
name = "value-trait"
|
2142
2190
|
version = "0.8.0"
|
data/Cargo.toml
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
:fire: Blazingly fast DataFrames for Ruby, powered by [Polars](https://github.com/pola-rs/polars)
|
4
4
|
|
5
|
-
[![Build Status](https://github.com/ankane/polars-ruby/workflows/build/badge.svg
|
5
|
+
[![Build Status](https://github.com/ankane/polars-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/polars-ruby/actions)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -357,7 +357,7 @@ Supported types are:
|
|
357
357
|
- float - `Float64`, `Float32`
|
358
358
|
- integer - `Int64`, `Int32`, `Int16`, `Int8`
|
359
359
|
- unsigned integer - `UInt64`, `UInt32`, `UInt16`, `UInt8`
|
360
|
-
- string - `
|
360
|
+
- string - `String`, `Binary`, `Categorical`
|
361
361
|
- temporal - `Date`, `Datetime`, `Time`, `Duration`
|
362
362
|
- nested - `List`, `Struct`, `Array`
|
363
363
|
- other - `Object`, `Null`
|
data/ext/polars/Cargo.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[package]
|
2
2
|
name = "polars"
|
3
|
-
version = "0.
|
3
|
+
version = "0.9.0"
|
4
4
|
license = "MIT"
|
5
5
|
authors = ["Andrew Kane <andrew@ankane.org>"]
|
6
6
|
edition = "2021"
|
@@ -15,18 +15,20 @@ ahash = "0.8"
|
|
15
15
|
chrono = "0.4"
|
16
16
|
either = "1.8"
|
17
17
|
magnus = "0.6"
|
18
|
-
polars-core = "=0.
|
19
|
-
polars-parquet = "=0.
|
20
|
-
polars-utils = "=0.
|
18
|
+
polars-core = "=0.38.1"
|
19
|
+
polars-parquet = "=0.38.1"
|
20
|
+
polars-utils = "=0.38.1"
|
21
21
|
serde_json = "1"
|
22
22
|
smartstring = "1"
|
23
23
|
|
24
24
|
[dependencies.polars]
|
25
|
-
version = "=0.
|
25
|
+
version = "=0.38.1"
|
26
26
|
features = [
|
27
27
|
"abs",
|
28
28
|
"approx_unique",
|
29
29
|
"arg_where",
|
30
|
+
"array_any_all",
|
31
|
+
"array_count",
|
30
32
|
"asof_join",
|
31
33
|
"avro",
|
32
34
|
"binary_encoding",
|
@@ -45,9 +47,10 @@ features = [
|
|
45
47
|
"dtype-full",
|
46
48
|
"dynamic_group_by",
|
47
49
|
"ewma",
|
50
|
+
"extract_groups",
|
48
51
|
"extract_jsonpath",
|
52
|
+
"find_many",
|
49
53
|
"fmt",
|
50
|
-
"horizontal_concat",
|
51
54
|
"interpolate",
|
52
55
|
"ipc",
|
53
56
|
"is_first_distinct",
|
@@ -56,12 +59,15 @@ features = [
|
|
56
59
|
"is_unique",
|
57
60
|
"json",
|
58
61
|
"lazy",
|
59
|
-
"
|
62
|
+
"list_any_all",
|
60
63
|
"list_count",
|
64
|
+
"list_drop_nulls",
|
61
65
|
"list_eval",
|
62
66
|
"list_gather",
|
67
|
+
"list_sample",
|
63
68
|
"list_to_struct",
|
64
69
|
"log",
|
70
|
+
"merge_sorted",
|
65
71
|
"meta",
|
66
72
|
"mode",
|
67
73
|
"moment",
|
@@ -77,8 +83,10 @@ features = [
|
|
77
83
|
"random",
|
78
84
|
"rank",
|
79
85
|
"range",
|
86
|
+
"regex",
|
80
87
|
"reinterpret",
|
81
88
|
"repeat_by",
|
89
|
+
"replace",
|
82
90
|
"rle",
|
83
91
|
"rolling_window",
|
84
92
|
"round_series",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
use magnus::{prelude::*, RArray, Value};
|
2
2
|
use polars::io::mmap::MmapBytesReader;
|
3
|
-
use polars::io::
|
3
|
+
use polars::io::RowIndex;
|
4
4
|
use polars::prelude::read_impl::OwnedBatchedCsvReader;
|
5
5
|
use polars::prelude::*;
|
6
6
|
use std::cell::RefCell;
|
@@ -46,7 +46,7 @@ impl RbBatchedCsv {
|
|
46
46
|
let null_values = Option::<Wrap<NullValues>>::try_convert(arguments[18])?;
|
47
47
|
let try_parse_dates = bool::try_convert(arguments[19])?;
|
48
48
|
let skip_rows_after_header = usize::try_convert(arguments[20])?;
|
49
|
-
let
|
49
|
+
let row_index = Option::<(String, IdxSize)>::try_convert(arguments[21])?;
|
50
50
|
let sample_size = usize::try_convert(arguments[22])?;
|
51
51
|
let eol_char = String::try_convert(arguments[23])?;
|
52
52
|
// end arguments
|
@@ -54,7 +54,7 @@ impl RbBatchedCsv {
|
|
54
54
|
let null_values = null_values.map(|w| w.0);
|
55
55
|
let eol_char = eol_char.as_bytes()[0];
|
56
56
|
|
57
|
-
let
|
57
|
+
let row_index = row_index.map(|(name, offset)| RowIndex { name, offset });
|
58
58
|
|
59
59
|
let quote_char = if let Some(s) = quote_char {
|
60
60
|
if s.is_empty() {
|
@@ -106,7 +106,7 @@ impl RbBatchedCsv {
|
|
106
106
|
.with_quote_char(quote_char)
|
107
107
|
.with_end_of_line_char(eol_char)
|
108
108
|
.with_skip_rows_after_header(skip_rows_after_header)
|
109
|
-
.
|
109
|
+
.with_row_index(row_index)
|
110
110
|
.sample_size(sample_size);
|
111
111
|
|
112
112
|
let reader = if low_memory {
|