polars-df 0.2.0-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +3 -0
  3. data/CHANGELOG.md +33 -0
  4. data/Cargo.lock +2230 -0
  5. data/Cargo.toml +10 -0
  6. data/LICENSE-THIRD-PARTY.txt +38856 -0
  7. data/LICENSE.txt +20 -0
  8. data/README.md +91 -0
  9. data/lib/polars/3.0/polars.bundle +0 -0
  10. data/lib/polars/3.1/polars.bundle +0 -0
  11. data/lib/polars/3.2/polars.bundle +0 -0
  12. data/lib/polars/batched_csv_reader.rb +96 -0
  13. data/lib/polars/cat_expr.rb +52 -0
  14. data/lib/polars/cat_name_space.rb +54 -0
  15. data/lib/polars/convert.rb +100 -0
  16. data/lib/polars/data_frame.rb +4833 -0
  17. data/lib/polars/data_types.rb +122 -0
  18. data/lib/polars/date_time_expr.rb +1418 -0
  19. data/lib/polars/date_time_name_space.rb +1484 -0
  20. data/lib/polars/dynamic_group_by.rb +52 -0
  21. data/lib/polars/exceptions.rb +20 -0
  22. data/lib/polars/expr.rb +5307 -0
  23. data/lib/polars/expr_dispatch.rb +22 -0
  24. data/lib/polars/functions.rb +453 -0
  25. data/lib/polars/group_by.rb +558 -0
  26. data/lib/polars/io.rb +814 -0
  27. data/lib/polars/lazy_frame.rb +2442 -0
  28. data/lib/polars/lazy_functions.rb +1195 -0
  29. data/lib/polars/lazy_group_by.rb +93 -0
  30. data/lib/polars/list_expr.rb +610 -0
  31. data/lib/polars/list_name_space.rb +346 -0
  32. data/lib/polars/meta_expr.rb +54 -0
  33. data/lib/polars/rolling_group_by.rb +35 -0
  34. data/lib/polars/series.rb +3730 -0
  35. data/lib/polars/slice.rb +104 -0
  36. data/lib/polars/string_expr.rb +972 -0
  37. data/lib/polars/string_name_space.rb +690 -0
  38. data/lib/polars/struct_expr.rb +100 -0
  39. data/lib/polars/struct_name_space.rb +64 -0
  40. data/lib/polars/utils.rb +192 -0
  41. data/lib/polars/version.rb +4 -0
  42. data/lib/polars/when.rb +16 -0
  43. data/lib/polars/when_then.rb +19 -0
  44. data/lib/polars-df.rb +1 -0
  45. data/lib/polars.rb +50 -0
  46. metadata +89 -0
@@ -0,0 +1,122 @@
1
+ module Polars
2
+ # Base class for all Polars data types.
3
+ class DataType
4
+ end
5
+
6
+ # 8-bit signed integer type.
7
+ class Int8 < DataType
8
+ end
9
+
10
+ # 16-bit signed integer type.
11
+ class Int16 < DataType
12
+ end
13
+
14
+ # 32-bit signed integer type.
15
+ class Int32 < DataType
16
+ end
17
+
18
+ # 64-bit signed integer type.
19
+ class Int64 < DataType
20
+ end
21
+
22
+ # 8-bit unsigned integer type.
23
+ class UInt8 < DataType
24
+ end
25
+
26
+ # 16-bit unsigned integer type.
27
+ class UInt16 < DataType
28
+ end
29
+
30
+ # 32-bit unsigned integer type.
31
+ class UInt32 < DataType
32
+ end
33
+
34
+ # 64-bit unsigned integer type.
35
+ class UInt64 < DataType
36
+ end
37
+
38
+ # 32-bit floating point type.
39
+ class Float32 < DataType
40
+ end
41
+
42
+ # 64-bit floating point type.
43
+ class Float64 < DataType
44
+ end
45
+
46
+ # Boolean type.
47
+ class Boolean < DataType
48
+ end
49
+
50
+ # UTF-8 encoded string type.
51
+ class Utf8 < DataType
52
+ end
53
+
54
+ # Binary type.
55
+ class Binary < DataType
56
+ end
57
+
58
+ # Type representing Null / None values.
59
+ class Null < DataType
60
+ end
61
+
62
+ # Type representing Datatype values that could not be determined statically.
63
+ class Unknown < DataType
64
+ end
65
+
66
+ # Nested list/array type.
67
+ class List < DataType
68
+ def initialize(inner)
69
+ @inner = Utils.rb_type_to_dtype(inner)
70
+ end
71
+ end
72
+
73
+ # Calendar date type.
74
+ class Date < DataType
75
+ end
76
+
77
+ # Calendar date and time type.
78
+ class Datetime < DataType
79
+ def initialize(time_unit = "us", time_zone = nil)
80
+ @tu = time_unit || "us"
81
+ @time_zone = time_zone
82
+ end
83
+ end
84
+
85
+ # Time duration/delta type.
86
+ class Duration < DataType
87
+ def initialize(time_unit = "us")
88
+ @tu = time_unit
89
+ end
90
+ end
91
+
92
+ # Time of day type.
93
+ class Time < DataType
94
+ end
95
+
96
+ # Type for wrapping arbitrary Python objects.
97
+ class Object < DataType
98
+ end
99
+
100
+ # A categorical encoding of a set of strings.
101
+ class Categorical < DataType
102
+ end
103
+
104
+ # Definition of a single field within a `Struct` DataType.
105
+ class Field < DataType
106
+ def initialize(name, dtype)
107
+ @name = name
108
+ @dtype = Utils.rb_type_to_dtype(dtype)
109
+ end
110
+ end
111
+
112
+ # Struct composite type.
113
+ class Struct < DataType
114
+ def initialize(fields)
115
+ if fields.is_a?(Hash)
116
+ @fields = fields.map { |n, d| Field.new(n, d) }
117
+ else
118
+ @fields = fields
119
+ end
120
+ end
121
+ end
122
+ end