daru_lite 0.3.4 → 0.3.5
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/History.md +60 -0
- data/README.md +1 -1
- data/lib/daru_lite/category.rb +1 -1
- data/lib/daru_lite/date_time/index.rb +2 -2
- data/lib/daru_lite/maths/statistics/vector.rb +1 -1
- data/lib/daru_lite/version.rb +1 -1
- data/lib/daru_lite.rb +1 -0
- metadata +54 -284
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/dependabot.yml +0 -11
- data/.github/workflows/ci.yml +0 -33
- data/.gitignore +0 -10
- data/.rspec +0 -2
- data/.rubocop.yml +0 -27
- data/.rubocop_todo.yml +0 -139
- data/CONTRIBUTING.md +0 -47
- data/Gemfile +0 -2
- data/Rakefile +0 -69
- data/ReleasePolicy.md +0 -20
- data/benchmarks/TradeoffData.csv +0 -65
- data/benchmarks/csv_reading.rb +0 -22
- data/benchmarks/dataframe_creation.rb +0 -39
- data/benchmarks/db_loading.rb +0 -33
- data/benchmarks/duplicating.rb +0 -45
- data/benchmarks/group_by.rb +0 -32
- data/benchmarks/joining.rb +0 -52
- data/benchmarks/row_access.rb +0 -41
- data/benchmarks/row_assign.rb +0 -36
- data/benchmarks/sorting.rb +0 -51
- data/benchmarks/statistics.rb +0 -28
- data/benchmarks/vector_access.rb +0 -31
- data/benchmarks/vector_assign.rb +0 -42
- data/benchmarks/where_clause.rb +0 -48
- data/benchmarks/where_vs_filter.rb +0 -28
- data/daru_lite.gemspec +0 -54
- data/daru_lite_test-shm +0 -0
- data/daru_lite_test-wal +0 -0
- data/images/README.md +0 -5
- data/images/con0.png +0 -0
- data/images/con1.png +0 -0
- data/images/init0.png +0 -0
- data/images/init1.png +0 -0
- data/images/man0.png +0 -0
- data/images/man1.png +0 -0
- data/images/man2.png +0 -0
- data/images/man3.png +0 -0
- data/images/man4.png +0 -0
- data/images/man5.png +0 -0
- data/images/man6.png +0 -0
- data/profile/_base.rb +0 -23
- data/profile/df_to_a.rb +0 -10
- data/profile/filter.rb +0 -13
- data/profile/joining.rb +0 -13
- data/profile/sorting.rb +0 -12
- data/profile/vector_each_with_index.rb +0 -9
- data/profile/vector_new.rb +0 -9
- data/spec/accessors/array_wrapper_spec.rb +0 -3
- data/spec/category_spec.rb +0 -1767
- data/spec/core/group_by_spec.rb +0 -655
- data/spec/core/merge_spec.rb +0 -179
- data/spec/core/query_spec.rb +0 -347
- data/spec/daru_lite_spec.rb +0 -22
- data/spec/data_frame/aggregatable_example.rb +0 -65
- data/spec/data_frame/buildable_example.rb +0 -109
- data/spec/data_frame/calculatable_example.rb +0 -135
- data/spec/data_frame/convertible_example.rb +0 -180
- data/spec/data_frame/duplicatable_example.rb +0 -134
- data/spec/data_frame/fetchable_example.rb +0 -510
- data/spec/data_frame/filterable_example.rb +0 -456
- data/spec/data_frame/indexable_example.rb +0 -221
- data/spec/data_frame/iterable_example.rb +0 -481
- data/spec/data_frame/joinable_example.rb +0 -131
- data/spec/data_frame/missable_example.rb +0 -47
- data/spec/data_frame/pivotable_example.rb +0 -297
- data/spec/data_frame/queryable_example.rb +0 -92
- data/spec/data_frame/setable_example.rb +0 -513
- data/spec/data_frame/sortable_example.rb +0 -368
- data/spec/dataframe_spec.rb +0 -1342
- data/spec/date_time/data_spec.rb +0 -197
- data/spec/date_time/date_time_index_helper_spec.rb +0 -72
- data/spec/date_time/index_spec.rb +0 -588
- data/spec/date_time/offsets_spec.rb +0 -465
- data/spec/extensions/which_dsl_spec.rb +0 -38
- data/spec/fixtures/bank2.dat +0 -200
- data/spec/fixtures/boolean_converter_test.csv +0 -5
- data/spec/fixtures/countries.json +0 -7794
- data/spec/fixtures/duplicates.csv +0 -32
- data/spec/fixtures/eciresults.html +0 -394
- data/spec/fixtures/empties.dat +0 -2
- data/spec/fixtures/empty_rows_test.csv +0 -17
- data/spec/fixtures/macau.html +0 -3691
- data/spec/fixtures/macd_data.csv +0 -150
- data/spec/fixtures/matrix_test.csv +0 -100
- data/spec/fixtures/moneycontrol.html +0 -6812
- data/spec/fixtures/music_data.tsv +0 -2501
- data/spec/fixtures/repeated_fields.csv +0 -7
- data/spec/fixtures/sales-funnel.csv +0 -18
- data/spec/fixtures/scientific_notation.csv +0 -4
- data/spec/fixtures/string_converter_test.csv +0 -5
- data/spec/fixtures/strings.dat +0 -2
- data/spec/fixtures/test_xls.xls +0 -0
- data/spec/fixtures/test_xls_2.xls +0 -0
- data/spec/fixtures/url_test.txt~ +0 -0
- data/spec/fixtures/valid_markup.html +0 -62
- data/spec/fixtures/wiki_climate.html +0 -1243
- data/spec/fixtures/wiki_table_info.html +0 -631
- data/spec/formatters/table_formatter_spec.rb +0 -137
- data/spec/helpers_spec.rb +0 -8
- data/spec/index/categorical_index_spec.rb +0 -289
- data/spec/index/index_spec.rb +0 -438
- data/spec/index/multi_index_spec.rb +0 -752
- data/spec/io/io_spec.rb +0 -357
- data/spec/io/sql_data_source_spec.rb +0 -48
- data/spec/iruby/dataframe_spec.rb +0 -170
- data/spec/iruby/helpers_spec.rb +0 -49
- data/spec/iruby/multi_index_spec.rb +0 -37
- data/spec/iruby/vector_spec.rb +0 -105
- data/spec/maths/arithmetic/dataframe_spec.rb +0 -148
- data/spec/maths/arithmetic/vector_spec.rb +0 -165
- data/spec/maths/statistics/dataframe_spec.rb +0 -191
- data/spec/maths/statistics/vector_spec.rb +0 -756
- data/spec/monkeys_spec.rb +0 -42
- data/spec/shared/vector_display_spec.rb +0 -213
- data/spec/spec_helper.rb +0 -87
- data/spec/support/database_helper.rb +0 -29
- data/spec/support/matchers.rb +0 -5
- data/spec/vector/aggregatable_example.rb +0 -27
- data/spec/vector/calculatable_example.rb +0 -82
- data/spec/vector/convertible_example.rb +0 -126
- data/spec/vector/duplicatable_example.rb +0 -48
- data/spec/vector/fetchable_example.rb +0 -463
- data/spec/vector/filterable_example.rb +0 -165
- data/spec/vector/indexable_example.rb +0 -201
- data/spec/vector/iterable_example.rb +0 -111
- data/spec/vector/joinable_example.rb +0 -25
- data/spec/vector/missable_example.rb +0 -88
- data/spec/vector/queryable_example.rb +0 -91
- data/spec/vector/setable_example.rb +0 -300
- data/spec/vector/sortable_example.rb +0 -242
- data/spec/vector_spec.rb +0 -599
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de64da6dbfe4a00b302051ee625c0d093a622e96df55b4199481d19c75c2f552
|
|
4
|
+
data.tar.gz: 908e11700ff1e8c2df635ea99747edbd2f8550d82962e6bc9fa79223d21e6462
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eff5b0aac5a75ae43482fc40c046f43e95fb58704dad16795dd878e29b0667d4f2918db835c7934199c89460d8196e12ad781aa679d0d74e61558c24a2fa23fc
|
|
7
|
+
data.tar.gz: 860fcdb0a648c535b21a963d06453bc4ce761886ad5fa505587f3e17eae9639dfcc2043be1f3231708daeb86b5b256443541c904225c3d119c1340dac5774334
|
data/History.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
+
# 0.3.5
|
|
2
|
+
* Declared `csv` and `matrix` as runtime dependencies
|
|
3
|
+
* Fixed `Vector#standardize`, `Vector#to_json` and `DataFrame#to_json` raising `NoMethodError` when ActiveSupport is not loaded
|
|
4
|
+
* Required Ruby 3.4 or later
|
|
5
|
+
* Stopped packaging specs, fixtures, benchmarks and images in the gem
|
|
6
|
+
* CI now runs on Ruby 3.4 and 4.0
|
|
7
|
+
|
|
8
|
+
# 0.3.4 (2026-07-20)
|
|
9
|
+
* Fixed latently-broken `CategoricalIndex` methods relying on `@relation_hash`
|
|
10
|
+
* Fixed DataFrame operations on a `MultiIndex` with duplicate tuples
|
|
11
|
+
|
|
12
|
+
# 0.3.3 (2026-07-01)
|
|
13
|
+
* Fixed `keep_vector_if` `TypeError` on a `MultiIndex` with duplicate tuples, preserving the vectors' index type
|
|
14
|
+
|
|
15
|
+
# 0.3.2 (2026-06-12)
|
|
16
|
+
* Fixed `NoMethodError` on single-key lookup with a `CategoricalIndex`
|
|
17
|
+
|
|
18
|
+
# 0.3.1 (2026-04-17)
|
|
19
|
+
* Raise `IndexError` on duplicate (row, column) pairs when using `crosstab_by_assignation`
|
|
20
|
+
|
|
21
|
+
# 0.3.0 (2026-04-14)
|
|
22
|
+
* Preserve `nil` rows when using `crosstab_by_assignation`
|
|
23
|
+
|
|
24
|
+
# 0.2.4 (2026-04-10)
|
|
25
|
+
* Updated rubocop and fixed offenses
|
|
26
|
+
|
|
27
|
+
# 0.2.3 (2026-03-27)
|
|
28
|
+
* Fixed regression when accessing a `MultiIndex` vector with an array among the arguments
|
|
29
|
+
|
|
30
|
+
# 0.2.2 (2026-03-27)
|
|
31
|
+
* Fixed regression when accessing a `MultiIndex` with an array among the arguments
|
|
32
|
+
|
|
33
|
+
# 0.2.1 (2026-03-26)
|
|
34
|
+
* Fixed `DataFrame#union` and row subsets via `#[]` when using a `MultiIndex`
|
|
35
|
+
* Dropped Code Climate
|
|
36
|
+
|
|
37
|
+
# 0.2.0 (2025-04-21)
|
|
38
|
+
* Updated dependencies
|
|
39
|
+
* [Breaking change] Dropped DBI
|
|
40
|
+
* [Security] Fixed polynomial ReDoS
|
|
41
|
+
|
|
42
|
+
# 0.1.3 (2024-09-09)
|
|
43
|
+
* Fixed `DataFrame#keep_row_if`, `Index#to_a` and `MultiIndex#delete_at`
|
|
44
|
+
|
|
45
|
+
# 0.1.2 (2024-09-05)
|
|
46
|
+
* Split the `DataFrame` and `Vector` classes into modules
|
|
47
|
+
* Fixed `rotate_vectors` with vectors of mixed classes
|
|
48
|
+
* Fixed `keep_row_if` for categorical indexes
|
|
49
|
+
|
|
50
|
+
# 0.1.1 (2024-02-26)
|
|
51
|
+
* First version of the daru Lite readme
|
|
52
|
+
* Fixed `inspect` when vector names are integers
|
|
53
|
+
* Fixed `order=` when vectors are of different classes
|
|
54
|
+
|
|
55
|
+
# 0.1.0 (2024-02-16)
|
|
56
|
+
* Renamed the gem to daru_lite
|
|
57
|
+
* Dropped gruff
|
|
58
|
+
* Added `DataFrame#rotate_vectors!` and `DataFrame#add_level_to_vectors`
|
|
59
|
+
* Added column to categorical index conversion
|
|
60
|
+
|
|
1
61
|
# 0.0.1
|
|
2
62
|
* Forked from Daru
|
|
3
63
|
* Fixed incompatibilities with Ruby 3.1
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Simple, straightforward DataFrames for Ruby
|
|
4
4
|
|
|
5
|
-
[](https://github.com/pollandroll/daru_lite/actions)
|
|
6
6
|
[](https://rubygems.org/gems/daru_lite)
|
|
7
7
|
|
|
8
8
|
## Introduction
|
data/lib/daru_lite/category.rb
CHANGED
|
@@ -766,7 +766,7 @@ module DaruLite
|
|
|
766
766
|
return if ordered?
|
|
767
767
|
|
|
768
768
|
raise ArgumentError, "Can not apply #{operation} when vector is unordered. " \
|
|
769
|
-
'To make the categorical data ordered, use #ordered = true'
|
|
769
|
+
'To make the categorical data ordered, use #ordered = true'
|
|
770
770
|
end
|
|
771
771
|
|
|
772
772
|
def dummy_coding(full)
|
|
@@ -260,8 +260,8 @@ module DaruLite
|
|
|
260
260
|
@offset =
|
|
261
261
|
case opts[:freq]
|
|
262
262
|
when :infer then Helper.infer_offset(data)
|
|
263
|
-
when
|
|
264
|
-
else
|
|
263
|
+
when nil then nil
|
|
264
|
+
else Helper.offset_from_frequency(opts[:freq])
|
|
265
265
|
end
|
|
266
266
|
|
|
267
267
|
@frequency = @offset&.freq_string
|
|
@@ -554,7 +554,7 @@ module DaruLite
|
|
|
554
554
|
def standardize(use_population = false)
|
|
555
555
|
m ||= mean
|
|
556
556
|
sd = use_population ? sdp : sds
|
|
557
|
-
return DaruLite::Vector.new([nil] * size) if m.nil? || sd.
|
|
557
|
+
return DaruLite::Vector.new([nil] * size) if m.nil? || sd.nil? || sd.zero?
|
|
558
558
|
|
|
559
559
|
vector_standardized_compute m, sd
|
|
560
560
|
end
|
data/lib/daru_lite/version.rb
CHANGED