polars-df 0.15.0 → 0.26.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.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +274 -0
  3. data/Cargo.lock +1465 -867
  4. data/Cargo.toml +3 -0
  5. data/LICENSE.txt +2 -2
  6. data/README.md +87 -37
  7. data/ext/polars/Cargo.toml +47 -16
  8. data/ext/polars/src/c_api/allocator.rs +7 -0
  9. data/ext/polars/src/c_api/mod.rs +1 -0
  10. data/ext/polars/src/catalog/mod.rs +1 -0
  11. data/ext/polars/src/catalog/unity.rs +470 -0
  12. data/ext/polars/src/conversion/any_value.rs +99 -84
  13. data/ext/polars/src/conversion/categorical.rs +30 -0
  14. data/ext/polars/src/conversion/chunked_array.rs +71 -62
  15. data/ext/polars/src/conversion/datetime.rs +63 -0
  16. data/ext/polars/src/conversion/mod.rs +796 -312
  17. data/ext/polars/src/dataframe/construction.rs +6 -18
  18. data/ext/polars/src/dataframe/export.rs +30 -39
  19. data/ext/polars/src/dataframe/general.rs +294 -362
  20. data/ext/polars/src/dataframe/io.rs +33 -150
  21. data/ext/polars/src/dataframe/map.rs +175 -0
  22. data/ext/polars/src/dataframe/mod.rs +37 -5
  23. data/ext/polars/src/dataframe/serde.rs +23 -8
  24. data/ext/polars/src/error.rs +44 -7
  25. data/ext/polars/src/exceptions.rs +21 -8
  26. data/ext/polars/src/expr/array.rs +86 -22
  27. data/ext/polars/src/expr/binary.rs +50 -1
  28. data/ext/polars/src/expr/bitwise.rs +39 -0
  29. data/ext/polars/src/expr/categorical.rs +20 -0
  30. data/ext/polars/src/expr/datatype.rs +51 -0
  31. data/ext/polars/src/expr/datetime.rs +99 -41
  32. data/ext/polars/src/expr/extension.rs +12 -0
  33. data/ext/polars/src/expr/general.rs +252 -128
  34. data/ext/polars/src/expr/list.rs +56 -60
  35. data/ext/polars/src/expr/meta.rs +30 -35
  36. data/ext/polars/src/expr/mod.rs +28 -6
  37. data/ext/polars/src/expr/name.rs +29 -14
  38. data/ext/polars/src/expr/rolling.rs +111 -3
  39. data/ext/polars/src/expr/selector.rs +219 -0
  40. data/ext/polars/src/expr/serde.rs +28 -0
  41. data/ext/polars/src/expr/string.rs +118 -20
  42. data/ext/polars/src/expr/struct.rs +14 -1
  43. data/ext/polars/src/file.rs +194 -86
  44. data/ext/polars/src/functions/aggregation.rs +13 -12
  45. data/ext/polars/src/functions/business.rs +2 -3
  46. data/ext/polars/src/functions/eager.rs +3 -2
  47. data/ext/polars/src/functions/io.rs +90 -18
  48. data/ext/polars/src/functions/lazy.rs +267 -118
  49. data/ext/polars/src/functions/meta.rs +8 -7
  50. data/ext/polars/src/functions/misc.rs +1 -1
  51. data/ext/polars/src/functions/mod.rs +2 -1
  52. data/ext/polars/src/functions/range.rs +88 -31
  53. data/ext/polars/src/functions/strings.rs +6 -0
  54. data/ext/polars/src/functions/utils.rs +8 -0
  55. data/ext/polars/src/interop/arrow/mod.rs +52 -1
  56. data/ext/polars/src/interop/arrow/{to_ruby.rs → to_rb.rs} +37 -7
  57. data/ext/polars/src/interop/arrow/to_rust.rs +43 -0
  58. data/ext/polars/src/interop/numo/to_numo_df.rs +1 -1
  59. data/ext/polars/src/interop/numo/to_numo_series.rs +72 -50
  60. data/ext/polars/src/io/cloud_options.rs +107 -0
  61. data/ext/polars/src/io/mod.rs +4 -0
  62. data/ext/polars/src/io/scan_options.rs +113 -0
  63. data/ext/polars/src/io/sink_options.rs +46 -0
  64. data/ext/polars/src/io/sink_output.rs +21 -0
  65. data/ext/polars/src/lazyframe/exitable.rs +39 -0
  66. data/ext/polars/src/lazyframe/general.rs +846 -368
  67. data/ext/polars/src/lazyframe/mod.rs +58 -5
  68. data/ext/polars/src/lazyframe/optflags.rs +59 -0
  69. data/ext/polars/src/lazyframe/serde.rs +36 -4
  70. data/ext/polars/src/lazyframe/sink.rs +46 -0
  71. data/ext/polars/src/lazygroupby.rs +38 -9
  72. data/ext/polars/src/lib.rs +574 -165
  73. data/ext/polars/src/map/lazy.rs +44 -74
  74. data/ext/polars/src/map/mod.rs +18 -254
  75. data/ext/polars/src/map/series.rs +241 -1087
  76. data/ext/polars/src/on_startup.rs +192 -9
  77. data/ext/polars/src/prelude.rs +1 -0
  78. data/ext/polars/src/rb_modules.rs +10 -57
  79. data/ext/polars/src/ruby/exceptions.rs +26 -0
  80. data/ext/polars/src/ruby/gvl.rs +104 -0
  81. data/ext/polars/src/ruby/lazy.rs +46 -0
  82. data/ext/polars/src/ruby/mod.rs +11 -0
  83. data/ext/polars/src/ruby/numo.rs +52 -0
  84. data/ext/polars/src/ruby/plan_callback.rs +198 -0
  85. data/ext/polars/src/ruby/rb_modules.rs +16 -0
  86. data/ext/polars/src/ruby/ruby_convert_registry.rs +51 -0
  87. data/ext/polars/src/ruby/ruby_function.rs +11 -0
  88. data/ext/polars/src/ruby/ruby_udf.rs +164 -0
  89. data/ext/polars/src/ruby/thread.rs +65 -0
  90. data/ext/polars/src/ruby/utils.rs +39 -0
  91. data/ext/polars/src/series/aggregation.rs +116 -91
  92. data/ext/polars/src/series/arithmetic.rs +16 -22
  93. data/ext/polars/src/series/comparison.rs +101 -222
  94. data/ext/polars/src/series/construction.rs +80 -70
  95. data/ext/polars/src/series/export.rs +98 -56
  96. data/ext/polars/src/series/general.rs +323 -440
  97. data/ext/polars/src/series/import.rs +22 -5
  98. data/ext/polars/src/series/map.rs +103 -0
  99. data/ext/polars/src/series/mod.rs +57 -15
  100. data/ext/polars/src/series/scatter.rs +139 -82
  101. data/ext/polars/src/sql.rs +16 -9
  102. data/ext/polars/src/testing/frame.rs +31 -0
  103. data/ext/polars/src/testing/mod.rs +5 -0
  104. data/ext/polars/src/testing/series.rs +31 -0
  105. data/ext/polars/src/timeout.rs +105 -0
  106. data/ext/polars/src/utils.rs +105 -4
  107. data/lib/polars/array_expr.rb +500 -22
  108. data/lib/polars/array_name_space.rb +384 -10
  109. data/lib/polars/batched_csv_reader.rb +48 -66
  110. data/lib/polars/binary_expr.rb +217 -0
  111. data/lib/polars/binary_name_space.rb +155 -1
  112. data/lib/polars/cat_expr.rb +224 -0
  113. data/lib/polars/cat_name_space.rb +132 -32
  114. data/lib/polars/catalog/unity/catalog_info.rb +20 -0
  115. data/lib/polars/catalog/unity/column_info.rb +31 -0
  116. data/lib/polars/catalog/unity/namespace_info.rb +21 -0
  117. data/lib/polars/catalog/unity/table_info.rb +50 -0
  118. data/lib/polars/catalog.rb +448 -0
  119. data/lib/polars/collect_batches.rb +22 -0
  120. data/lib/polars/config.rb +3 -3
  121. data/lib/polars/convert.rb +201 -36
  122. data/lib/polars/data_frame.rb +2851 -1017
  123. data/lib/polars/data_frame_plot.rb +173 -0
  124. data/lib/polars/data_type_expr.rb +52 -0
  125. data/lib/polars/data_type_group.rb +6 -0
  126. data/lib/polars/data_types.rb +118 -18
  127. data/lib/polars/date_time_expr.rb +426 -84
  128. data/lib/polars/date_time_name_space.rb +384 -111
  129. data/lib/polars/dynamic_group_by.rb +102 -10
  130. data/lib/polars/exceptions.rb +50 -5
  131. data/lib/polars/expr.rb +2159 -915
  132. data/lib/polars/extension_expr.rb +39 -0
  133. data/lib/polars/extension_name_space.rb +39 -0
  134. data/lib/polars/functions/aggregation/horizontal.rb +11 -6
  135. data/lib/polars/functions/aggregation/vertical.rb +2 -3
  136. data/lib/polars/functions/as_datatype.rb +290 -8
  137. data/lib/polars/functions/business.rb +95 -0
  138. data/lib/polars/functions/col.rb +6 -5
  139. data/lib/polars/functions/datatype.rb +62 -0
  140. data/lib/polars/functions/eager.rb +426 -24
  141. data/lib/polars/functions/escape_regex.rb +21 -0
  142. data/lib/polars/functions/lazy.rb +813 -195
  143. data/lib/polars/functions/lit.rb +21 -10
  144. data/lib/polars/functions/range/int_range.rb +74 -2
  145. data/lib/polars/functions/range/linear_space.rb +195 -0
  146. data/lib/polars/functions/range/time_range.rb +1 -1
  147. data/lib/polars/functions/repeat.rb +7 -12
  148. data/lib/polars/functions/whenthen.rb +2 -2
  149. data/lib/polars/group_by.rb +188 -58
  150. data/lib/polars/iceberg_dataset.rb +108 -0
  151. data/lib/polars/in_process_query.rb +37 -0
  152. data/lib/polars/io/cloud.rb +18 -0
  153. data/lib/polars/io/csv.rb +336 -128
  154. data/lib/polars/io/database.rb +19 -4
  155. data/lib/polars/io/delta.rb +134 -0
  156. data/lib/polars/io/iceberg.rb +34 -0
  157. data/lib/polars/io/ipc.rb +63 -63
  158. data/lib/polars/io/json.rb +16 -0
  159. data/lib/polars/io/lines.rb +172 -0
  160. data/lib/polars/io/ndjson.rb +176 -20
  161. data/lib/polars/io/parquet.rb +173 -95
  162. data/lib/polars/io/scan_options.rb +55 -0
  163. data/lib/polars/io/sink_options.rb +27 -0
  164. data/lib/polars/io/utils.rb +17 -0
  165. data/lib/polars/lazy_frame.rb +3017 -622
  166. data/lib/polars/lazy_group_by.rb +436 -2
  167. data/lib/polars/list_expr.rb +551 -59
  168. data/lib/polars/list_name_space.rb +465 -51
  169. data/lib/polars/meta_expr.rb +146 -24
  170. data/lib/polars/name_expr.rb +87 -2
  171. data/lib/polars/query_opt_flags.rb +264 -0
  172. data/lib/polars/rolling_group_by.rb +90 -5
  173. data/lib/polars/scan_cast_options.rb +86 -0
  174. data/lib/polars/schema.rb +128 -0
  175. data/lib/polars/selector.rb +245 -0
  176. data/lib/polars/selectors.rb +1048 -201
  177. data/lib/polars/series.rb +2522 -774
  178. data/lib/polars/series_plot.rb +72 -0
  179. data/lib/polars/slice.rb +1 -1
  180. data/lib/polars/sql_context.rb +13 -6
  181. data/lib/polars/string_cache.rb +19 -72
  182. data/lib/polars/string_expr.rb +561 -107
  183. data/lib/polars/string_name_space.rb +781 -109
  184. data/lib/polars/struct_expr.rb +139 -18
  185. data/lib/polars/struct_name_space.rb +19 -1
  186. data/lib/polars/testing.rb +24 -273
  187. data/lib/polars/utils/constants.rb +2 -0
  188. data/lib/polars/utils/construction/data_frame.rb +410 -0
  189. data/lib/polars/utils/construction/series.rb +350 -0
  190. data/lib/polars/utils/construction/utils.rb +9 -0
  191. data/lib/polars/utils/convert.rb +18 -8
  192. data/lib/polars/utils/deprecation.rb +11 -0
  193. data/lib/polars/utils/parse.rb +62 -9
  194. data/lib/polars/utils/reduce_balanced.rb +43 -0
  195. data/lib/polars/utils/serde.rb +22 -0
  196. data/lib/polars/utils/unstable.rb +19 -0
  197. data/lib/polars/utils/various.rb +86 -1
  198. data/lib/polars/utils.rb +63 -48
  199. data/lib/polars/version.rb +1 -1
  200. data/lib/polars.rb +85 -2
  201. metadata +80 -28
  202. data/ext/polars/src/allocator.rs +0 -13
  203. data/ext/polars/src/batched_csv.rs +0 -138
  204. data/ext/polars/src/functions/string_cache.rs +0 -25
  205. data/ext/polars/src/map/dataframe.rs +0 -338
  206. data/lib/polars/plot.rb +0 -109
@@ -1,15 +1,30 @@
1
1
  module Polars
2
2
  module Convert
3
- # Construct a DataFrame from a dictionary of sequences.
3
+ # Construct a DataFrame from a hash of arrays.
4
4
  #
5
5
  # This operation clones data, unless you pass in a `Hash<String, Series>`.
6
6
  #
7
7
  # @param data [Hash]
8
8
  # Two-dimensional data represented as a hash. Hash must contain
9
9
  # arrays.
10
- # @param columns [Array]
11
- # Column labels to use for resulting DataFrame. If specified, overrides any
12
- # labels already present in the data. Must match data dimensions.
10
+ # @param schema [Object]
11
+ # The DataFrame schema may be declared in several ways:
12
+ #
13
+ # * As a hash of \\\\{name:type} pairs; if type is nil, it will be auto-inferred.
14
+ # * As an array of column names; in this case types are automatically inferred.
15
+ # * As an array of [name,type] pairs; this is equivalent to the hash form.
16
+ #
17
+ # If you supply an array of column names that does not match the names in the
18
+ # underlying data, the names given here will overwrite them. The number
19
+ # of names given in the schema should match the underlying data dimensions.
20
+ # @param schema_overrides [Hash]
21
+ # Support type specification or override of one or more columns; note that
22
+ # any dtypes inferred from the columns param will be overridden.
23
+ # @param strict [Boolean]
24
+ # Throw an error if any `data` value does not exactly match the given or inferred
25
+ # data type for that column. If set to `false`, values that do not match the data
26
+ # type are cast to that data type or, if casting is not possible, set to null
27
+ # instead.
13
28
  #
14
29
  # @return [DataFrame]
15
30
  #
@@ -26,24 +41,47 @@ module Polars
26
41
  # # │ 1 ┆ 3 │
27
42
  # # │ 2 ┆ 4 │
28
43
  # # └─────┴─────┘
29
- def from_hash(data, schema: nil, columns: nil)
44
+ def from_hash(data, schema: nil, schema_overrides: nil, strict: true)
30
45
  Utils.wrap_df(
31
- DataFrame.hash_to_rbdf(
46
+ Utils.hash_to_rbdf(
32
47
  data,
33
- schema: schema || columns
48
+ schema: schema,
49
+ schema_overrides: schema_overrides,
50
+ strict: strict
34
51
  )
35
52
  )
36
53
  end
37
54
 
38
- # Construct a DataFrame from a sequence of dictionaries. This operation clones data.
55
+ # Construct a DataFrame from an array of hashes. This operation clones data.
39
56
  #
40
- # @param hashes [Array]
41
- # Array with hashes mapping column name to value.
42
- # @param infer_schema_length [Integer]
43
- # How many hashes/rows to scan to determine the data types
44
- # if set to `nil` all rows are scanned. This will be slow.
57
+ # @param data [Array]
58
+ # Array with hashes mapping column name to value
45
59
  # @param schema [Object]
46
- # Schema that (partially) overwrites the inferred schema.
60
+ # The DataFrame schema may be declared in several ways:
61
+ #
62
+ # * As a dict of \\\\{name:type} pairs; if type is nil, it will be auto-inferred.
63
+ # * As a list of column names; in this case types are automatically inferred.
64
+ # * As a list of (name,type) pairs; this is equivalent to the hash form.
65
+ #
66
+ # If a list of column names is supplied that does NOT match the names in the
67
+ # underlying data, the names given here will overwrite the actual fields in
68
+ # the order that they appear - however, in this case it is typically clearer
69
+ # to rename after loading the frame.
70
+ #
71
+ # If you want to drop some of the fields found in the input hashes, a
72
+ # *partial* schema can be declared, in which case omitted fields will not be
73
+ # loaded. Similarly, you can extend the loaded frame with empty columns by
74
+ # adding them to the schema.
75
+ # @param schema_overrides [Hash]
76
+ # Support override of inferred types for one or more columns.
77
+ # @param strict [Boolean]
78
+ # Throw an error if any `data` value does not exactly match the given or inferred
79
+ # data type for that column. If set to `false`, values that do not match the data
80
+ # type are cast to that data type or, if casting is not possible, set to null
81
+ # instead.
82
+ # @param infer_schema_length [Integer]
83
+ # The maximum number of rows to scan for schema inference.
84
+ # If set to `nil`, the full data may be scanned *(this is slow)*.
47
85
  #
48
86
  # @return [DataFrame]
49
87
  #
@@ -62,37 +100,164 @@ module Polars
62
100
  # # │ 3 ┆ 6 │
63
101
  # # └─────┴─────┘
64
102
  #
65
- # @example Overwrite first column name and dtype
66
- # Polars.from_hashes(data, schema: {"c" => :i32})
103
+ # @example Declaring a partial `schema` will drop the omitted columns.
104
+ # Polars.from_hashes(data, schema: {"a" => Polars::Int32})
105
+ # # =>
106
+ # # shape: (3, 1)
107
+ # # ┌─────┐
108
+ # # │ a │
109
+ # # │ --- │
110
+ # # │ i32 │
111
+ # # ╞═════╡
112
+ # # │ 1 │
113
+ # # │ 2 │
114
+ # # │ 3 │
115
+ # # └─────┘
116
+ def from_hashes(
117
+ data,
118
+ schema: nil,
119
+ schema_overrides: nil,
120
+ strict: true,
121
+ infer_schema_length: N_INFER_DEFAULT
122
+ )
123
+ if !data.any? && !(schema.any? || schema_overrides.any?)
124
+ msg = "no data, cannot infer schema"
125
+ raise NoDataError, msg
126
+ end
127
+
128
+ DataFrame.new(
129
+ data,
130
+ schema: schema,
131
+ schema_overrides: schema_overrides,
132
+ strict: strict,
133
+ infer_schema_length: infer_schema_length
134
+ )
135
+ end
136
+
137
+ # Construct a DataFrame from an array of arrays. This operation clones data.
138
+ #
139
+ # Note that this is slower than creating from columnar memory.
140
+ #
141
+ # @param data [Array]
142
+ # Two-dimensional data represented as an array of arrays.
143
+ # @param schema [Object]
144
+ # The DataFrame schema may be declared in several ways:
145
+ #
146
+ # * As a dict of \\\\{name:type} pairs; if type is nil, it will be auto-inferred.
147
+ # * As a list of column names; in this case types are automatically inferred.
148
+ # * As a list of (name,type) pairs; this is equivalent to the hash form.
149
+ #
150
+ # If you supply a list of column names that does not match the names in the
151
+ # underlying data, the names given here will overwrite them. The number
152
+ # of names given in the schema should match the underlying data dimensions.
153
+ # @param schema_overrides [Hash]
154
+ # Support type specification or override of one or more columns; note that
155
+ # any dtypes inferred from the columns param will be overridden.
156
+ # @param strict [Boolean]
157
+ # Throw an error if any `data` value does not exactly match the given or inferred
158
+ # data type for that column. If set to `false`, values that do not match the data
159
+ # type are cast to that data type or, if casting is not possible, set to null
160
+ # instead.
161
+ # @param orient ['col', 'row']
162
+ # Whether to interpret two-dimensional data as columns or as rows. If nil,
163
+ # the orientation is inferred by matching the columns and data dimensions. If
164
+ # this does not yield conclusive results, column orientation is used.
165
+ # @param infer_schema_length [Integer]
166
+ # The maximum number of rows to scan for schema inference.
167
+ # If set to `nil`, the full data may be scanned *(this is slow)*.
168
+ #
169
+ # @return [DataFrame]
170
+ #
171
+ # @example
172
+ # data = [[1, 2, 3], [4, 5, 6]]
173
+ # Polars.from_records(data, schema: ["a", "b"])
67
174
  # # =>
68
175
  # # shape: (3, 2)
69
176
  # # ┌─────┬─────┐
70
- # # │ c ┆ b │
177
+ # # │ a ┆ b │
71
178
  # # │ --- ┆ --- │
72
- # # │ i32 ┆ i64 │
179
+ # # │ i64 ┆ i64 │
73
180
  # # ╞═════╪═════╡
74
181
  # # │ 1 ┆ 4 │
75
182
  # # │ 2 ┆ 5 │
76
183
  # # │ 3 ┆ 6 │
77
184
  # # └─────┴─────┘
78
- #
79
- # @example Let polars infer the dtypes but inform about a 3rd column
80
- # Polars.from_hashes(data, schema: {"a" => :unknown, "b" => :unknown, "c" => :i32})
81
- # # shape: (3, 3)
82
- # # ┌─────┬─────┬──────┐
83
- # # │ a ┆ b ┆ c │
84
- # # │ --- ┆ --- ┆ --- │
85
- # # │ i64 ┆ i64 ┆ i32 │
86
- # # ╞═════╪═════╪══════╡
87
- # # 1 ┆ 4 ┆ null │
88
- # # 2 ┆ 5 ┆ null
89
- # # 3 ┆ 6 ┆ null
90
- # # └─────┴─────┴──────┘
91
- # def from_hashes(hashes, infer_schema_length: 50, schema: nil)
92
- # DataFrame._from_hashes(hashes, infer_schema_length: infer_schema_length, schema: schema)
93
- # end
185
+ def from_records(
186
+ data,
187
+ schema: nil,
188
+ schema_overrides: nil,
189
+ strict: true,
190
+ orient: nil,
191
+ infer_schema_length: N_INFER_DEFAULT
192
+ )
193
+ if !data.is_a?(::Array)
194
+ msg = (
195
+ "expected data of type Array, got #{data.class.name.inspect}" +
196
+ "\n\nHint: Try passing your data to the DataFrame constructor instead," +
197
+ " e.g. `Polars::DataFrame.new(data)`."
198
+ )
199
+ raise TypeError, msg
200
+ end
94
201
 
95
- # def from_records
96
- # end
202
+ Utils.wrap_df(
203
+ Utils.sequence_to_rbdf(
204
+ data,
205
+ schema: schema,
206
+ schema_overrides: schema_overrides,
207
+ strict: strict,
208
+ orient: orient,
209
+ infer_schema_length: infer_schema_length
210
+ )
211
+ )
212
+ end
213
+
214
+ # Construct a DataFrame from a NumPy ndarray. This operation clones data.
215
+ #
216
+ # Note that this is slower than creating from columnar memory.
217
+ #
218
+ # @param data [Numo::NArray]
219
+ # Two-dimensional data represented as a NumPy ndarray.
220
+ # @param schema [Object]
221
+ # The DataFrame schema may be declared in several ways:
222
+ #
223
+ # * As a dict of \\\\{name:type} pairs; if type is nil, it will be auto-inferred.
224
+ # * As a list of column names; in this case types are automatically inferred.
225
+ # * As a list of (name,type) pairs; this is equivalent to the hash form.
226
+ #
227
+ # If you supply a list of column names that does not match the names in the
228
+ # underlying data, the names given here will overwrite them. The number
229
+ # of names given in the schema should match the underlying data dimensions.
230
+ # @param schema_overrides [Hash]
231
+ # Support type specification or override of one or more columns; note that
232
+ # any dtypes inferred from the columns param will be overridden.
233
+ # @param orient ['col', 'row']
234
+ # Whether to interpret two-dimensional data as columns or as rows. If nil,
235
+ # the orientation is inferred by matching the columns and data dimensions. If
236
+ # this does not yield conclusive results, column orientation is used.
237
+ #
238
+ # @return [DataFrame]
239
+ #
240
+ # @example
241
+ # data = Numo::NArray.cast([[1, 2, 3], [4, 5, 6]])
242
+ # Polars.from_numo(data, schema: ["a", "b"], orient: "col")
243
+ # # =>
244
+ # # shape: (3, 2)
245
+ # # ┌─────┬─────┐
246
+ # # │ a ┆ b │
247
+ # # │ --- ┆ --- │
248
+ # # │ i64 ┆ i64 │
249
+ # # ╞═════╪═════╡
250
+ # # │ 1 ┆ 4 │
251
+ # # │ 2 ┆ 5 │
252
+ # # │ 3 ┆ 6 │
253
+ # # └─────┴─────┘
254
+ def from_numo(
255
+ data,
256
+ schema: nil,
257
+ schema_overrides: nil,
258
+ orient: nil
259
+ )
260
+ raise Todo
261
+ end
97
262
  end
98
263
  end