mirror of
https://github.com/enso-org/enso.git
synced 2024-08-17 00:40:34 +03:00
Apply ICONs (#8360)
- Amend a couple of missed groups. - Add the first pass of some ICONs. The linter tool has been updated to support rewriting the ICON as well.
This commit is contained in:
parent
e492d3f260
commit
f60836d9e1
@ -96,6 +96,7 @@ type S3_File
|
||||
|
||||
## ALIAS load, open
|
||||
GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Read a file using the specified file format
|
||||
|
||||
Arguments:
|
||||
@ -119,12 +120,14 @@ type S3_File
|
||||
_ -> self.with_input_stream [File_Access.Read] format.read_stream
|
||||
|
||||
## ALIAS load bytes, open bytes
|
||||
ICON data_input
|
||||
Reads all bytes in this file into a byte vector.
|
||||
read_bytes : Vector ! File_Error
|
||||
read_bytes self =
|
||||
self.read Bytes
|
||||
|
||||
## ALIAS load text, open text
|
||||
ICON data_input
|
||||
Reads the whole file into a `Text`, with specified encoding.
|
||||
|
||||
Arguments:
|
||||
|
@ -23,6 +23,7 @@ from project.System.File_Format import Auto_Detect, File_Format
|
||||
|
||||
## ALIAS load, open
|
||||
GROUP Input
|
||||
ICON data_input
|
||||
Reads a file into Enso.
|
||||
Uses the specified file format to parse the file into an Enso type. If not
|
||||
specified will use the file's extension to determine the file format.
|
||||
@ -67,6 +68,7 @@ read path format=Auto_Detect (on_problems=Problem_Behavior.Report_Warning) = cas
|
||||
|
||||
## ALIAS load text, open text
|
||||
GROUP Input
|
||||
ICON data_input
|
||||
Open and read the file at the provided `path`.
|
||||
|
||||
Arguments:
|
||||
|
@ -27,6 +27,7 @@ from project.Data.Range.Extensions import all
|
||||
@Builtin_Type
|
||||
type Array
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Gets an element from the array at a specified index (0-based).
|
||||
|
||||
Arguments:
|
||||
@ -146,6 +147,7 @@ type Array
|
||||
|
||||
## ALIAS first, last, sample, slice
|
||||
GROUP Selections
|
||||
ICON select_row
|
||||
Creates a new `Vector` with only the specified range of elements from the
|
||||
input, removing any elements outside the range.
|
||||
|
||||
@ -159,6 +161,7 @@ type Array
|
||||
take self range=(Index_Sub_Range.First 1) = Vector.take self range
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Creates a new `Vector`, removing any elements from the specified range.
|
||||
|
||||
Arguments:
|
||||
@ -200,6 +203,7 @@ type Array
|
||||
remove self at=-1 = Vector.remove self at
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Get the first element from the array, or an `Index_Out_Of_Bounds` if the array
|
||||
is empty.
|
||||
|
||||
@ -211,6 +215,7 @@ type Array
|
||||
first self = self.at 0
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Get the second element from the array, or a `Index_Out_Of_Bounds` if the
|
||||
array doesn't have a second element.
|
||||
|
||||
@ -224,6 +229,7 @@ type Array
|
||||
second self = self.at 1
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Get the last element of the array, or an `Index_Out_Of_Bounds` if the array is
|
||||
empty.
|
||||
|
||||
@ -293,6 +299,7 @@ type Array
|
||||
to_list self = Vector.to_list self
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Keeps only unique elements within the array, removing any duplicates.
|
||||
|
||||
Arguments:
|
||||
@ -317,7 +324,8 @@ type Array
|
||||
distinct : (Any -> Any) -> Vector Any
|
||||
distinct self (on = x->x) = Vector.distinct self on
|
||||
|
||||
## Applies a function to each element of the array, returning the `Vector` of
|
||||
## ICON dataframe_map_column
|
||||
Applies a function to each element of the array, returning the `Vector` of
|
||||
results.
|
||||
|
||||
Arguments:
|
||||
@ -346,6 +354,7 @@ type Array
|
||||
flat_map self function = Vector.flat_map self function
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Selects all elements of this array which satisfy a condition.
|
||||
|
||||
Arguments:
|
||||
@ -393,7 +402,8 @@ type Array
|
||||
running_fold : Any -> (Any -> Any -> Any) -> Vector Any
|
||||
running_fold self init function = Vector.running_fold self init function
|
||||
|
||||
## Combines all the elements of the array, by iteratively applying the
|
||||
## ICON dataframe_map_column
|
||||
Combines all the elements of the array, by iteratively applying the
|
||||
passed function with next elements of the array.
|
||||
|
||||
Arguments:
|
||||
@ -412,7 +422,8 @@ type Array
|
||||
fold : Any -> (Any -> Any -> Any) -> Any
|
||||
fold self init function = Vector.fold self init function
|
||||
|
||||
## Combines all the elements of the array, by iteratively applying the
|
||||
## ICON dataframe_map_column
|
||||
Combines all the elements of the array, by iteratively applying the
|
||||
passed function with next elements of the array.
|
||||
|
||||
Arguments:
|
||||
@ -451,6 +462,7 @@ type Array
|
||||
pad self n elem = Vector.pad self n elem
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Partitions the array into `Vector`s of elements which satisfy a given
|
||||
condition and ones that do not.
|
||||
|
||||
@ -548,7 +560,8 @@ type Array
|
||||
find : (Filter_Condition | (Any -> Boolean)) -> Integer -> Any -> Any
|
||||
find self condition start=0 ~if_missing=(Error.throw Not_Found) = Vector.find self condition start if_missing
|
||||
|
||||
## Gets an element from the array at a specified index (0-based).
|
||||
## ICON select_row
|
||||
Gets an element from the array at a specified index (0-based).
|
||||
If the index is invalid then `if_missing` is returned.
|
||||
|
||||
Arguments:
|
||||
@ -570,6 +583,7 @@ type Array
|
||||
not_empty self = self.is_empty.not
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Selects all elements of this array which satisfy a predicate.
|
||||
|
||||
Arguments:
|
||||
@ -609,7 +623,8 @@ type Array
|
||||
to_display_text : Text
|
||||
to_display_text self = self.short_display_text max_entries=40
|
||||
|
||||
## Combines all the elements of a non-empty array using a binary operation.
|
||||
## ICON dataframe_map_column
|
||||
Combines all the elements of a non-empty array using a binary operation.
|
||||
If the array is empty, it returns `if_empty`.
|
||||
|
||||
Arguments:
|
||||
@ -676,6 +691,7 @@ type Array
|
||||
|
||||
## ALIAS combine, join by row position, merge
|
||||
GROUP Calculations
|
||||
ICON dataframes_join
|
||||
Performs a pair-wise operation passed in `function` on consecutive
|
||||
elements of `self` and `that`.
|
||||
|
||||
|
@ -104,6 +104,7 @@ type Enso_File
|
||||
|
||||
## ALIAS load, open
|
||||
GROUP Input
|
||||
ICON data_input
|
||||
Read a file using the specified file format
|
||||
|
||||
Arguments:
|
||||
@ -131,12 +132,14 @@ type Enso_File
|
||||
_ -> self.with_input_stream [File_Access.Read] format.read_stream
|
||||
|
||||
## ALIAS load bytes, open bytes
|
||||
ICON data_input
|
||||
Reads all bytes in this file into a byte vector.
|
||||
read_bytes : Vector ! File_Error
|
||||
read_bytes self =
|
||||
self.read Bytes
|
||||
|
||||
## ALIAS load text, open text
|
||||
ICON data_input
|
||||
Reads the whole file into a `Text`, with specified encoding.
|
||||
|
||||
Arguments:
|
||||
|
@ -201,6 +201,7 @@ type Vector a
|
||||
length self = Array_Like_Helpers.length self
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Gets an element from the vector at a specified index (0-based).
|
||||
|
||||
Arguments:
|
||||
@ -220,7 +221,8 @@ type Vector a
|
||||
at : Integer -> Any ! Index_Out_Of_Bounds
|
||||
at self index = Array_Like_Helpers.at self index
|
||||
|
||||
## Gets an element from the vector at a specified index (0-based).
|
||||
## ICON select_row
|
||||
Gets an element from the vector at a specified index (0-based).
|
||||
If the index is invalid then `if_missing` is returned.
|
||||
|
||||
Arguments:
|
||||
@ -234,7 +236,8 @@ type Vector a
|
||||
if index < -len || index >= len then if_missing else
|
||||
self.at index
|
||||
|
||||
## Combines all the elements of the vector, by iteratively applying the
|
||||
## ICON dataframe_map_column
|
||||
Combines all the elements of the vector, by iteratively applying the
|
||||
passed function with next elements of the vector.
|
||||
|
||||
Arguments:
|
||||
@ -255,7 +258,8 @@ type Vector a
|
||||
f = acc -> ix -> function acc (self.at ix)
|
||||
0.up_to self.length . fold init f
|
||||
|
||||
## Combines all the elements of the vector, by iteratively applying the
|
||||
## ICON dataframe_map_column
|
||||
Combines all the elements of the vector, by iteratively applying the
|
||||
passed function with next elements of the vector.
|
||||
|
||||
Arguments:
|
||||
@ -292,7 +296,8 @@ type Vector a
|
||||
built = self.fold (Vector.new_builder self.length) wrapped
|
||||
built.to_vector
|
||||
|
||||
## Combines all the elements of a non-empty vector using a binary operation.
|
||||
## ICON dataframe_map_column
|
||||
Combines all the elements of a non-empty vector using a binary operation.
|
||||
If the vector is empty, it returns `if_empty`.
|
||||
|
||||
Arguments:
|
||||
@ -467,6 +472,7 @@ type Vector a
|
||||
not_empty self = self.is_empty.not
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Selects all elements of this vector which satisfy a condition.
|
||||
|
||||
Arguments:
|
||||
@ -488,6 +494,7 @@ type Vector a
|
||||
builder.to_vector
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Selects all elements of this vector which satisfy a predicate.
|
||||
|
||||
Arguments:
|
||||
@ -506,6 +513,7 @@ type Vector a
|
||||
builder.to_vector
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Partitions the vector into `Vector`s of elements which satisfy a given
|
||||
condition and ones that do not.
|
||||
|
||||
@ -566,7 +574,8 @@ type Vector a
|
||||
False -> Pair.new acc.first (acc.second.append elem)
|
||||
pair.map .to_vector
|
||||
|
||||
## Applies a function to each element of the vector, returning the `Vector` of
|
||||
## ICON dataframe_map_column
|
||||
Applies a function to each element of the vector, returning the `Vector` of
|
||||
results.
|
||||
|
||||
Arguments:
|
||||
@ -808,6 +817,7 @@ type Vector a
|
||||
|
||||
## ALIAS first, last, sample, slice
|
||||
GROUP Selections
|
||||
ICON select_row
|
||||
Creates a new `Vector` with only the specified range of elements from the
|
||||
input, removing any elements outside the range.
|
||||
|
||||
@ -830,6 +840,7 @@ type Vector a
|
||||
take_helper self.length (self.at _) self.slice (slice_ranges self) range
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Creates a new `Vector`, removing any elements from the specified range.
|
||||
|
||||
Arguments:
|
||||
@ -844,6 +855,7 @@ type Vector a
|
||||
|
||||
## ALIAS combine, join by row position, merge
|
||||
GROUP Calculations
|
||||
ICON dataframes_join
|
||||
Performs a pair-wise operation passed in `function` on consecutive
|
||||
elements of `self` and `that`.
|
||||
|
||||
@ -896,6 +908,7 @@ type Vector a
|
||||
self + (Vector.fill n-self.length elem)
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Get the first element from the vector, or an `Index_Out_Of_Bounds` if the vector
|
||||
is empty.
|
||||
|
||||
@ -907,6 +920,7 @@ type Vector a
|
||||
first self = self.at 0
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Get the last element of the vector, or an `Index_Out_Of_Bounds` if the vector is
|
||||
empty.
|
||||
|
||||
@ -918,6 +932,7 @@ type Vector a
|
||||
last self = self.at -1
|
||||
|
||||
## GROUP Selections
|
||||
ICON select_row
|
||||
Get the second element from the vector, or a `Index_Out_Of_Bounds` if the
|
||||
vector doesn't have a second element.
|
||||
|
||||
@ -1014,6 +1029,7 @@ type Vector a
|
||||
self.sort_builtin order.to_sign comps compare_funcs by on on_incomparable.to_number
|
||||
|
||||
## GROUP Selections
|
||||
ICON preparation
|
||||
Keeps only unique elements within the vector, removing any duplicates.
|
||||
|
||||
Arguments:
|
||||
|
@ -311,8 +311,7 @@ type XML_Element
|
||||
XML_Error.handle_java_exceptions <|
|
||||
XML_Utils.innerXML self.java_element
|
||||
|
||||
## GROUP Metadata
|
||||
Gets elements matching a given tag name.
|
||||
## Gets elements matching a given tag name.
|
||||
|
||||
This searches through all descendants of the node, not just immediate children.
|
||||
|
||||
|
@ -232,6 +232,7 @@ type File
|
||||
|
||||
## ALIAS load, open
|
||||
GROUP Input
|
||||
ICON data_input
|
||||
Read a file using the specified file format
|
||||
|
||||
Arguments:
|
||||
@ -268,6 +269,7 @@ type File
|
||||
format.read self on_problems
|
||||
|
||||
## ALIAS load bytes, open bytes
|
||||
ICON data_input
|
||||
Reads all bytes in this file into a byte vector.
|
||||
|
||||
> Example
|
||||
@ -282,6 +284,7 @@ type File
|
||||
self.with_input_stream opts (_.read_all_bytes)
|
||||
|
||||
## ALIAS load text, open text
|
||||
ICON data_input
|
||||
Reads the whole file into a `Text`, with specified encoding.
|
||||
|
||||
Arguments:
|
||||
|
@ -60,11 +60,13 @@ type File_Permissions
|
||||
owner_execute : Boolean
|
||||
owner_execute self = self.owner.contains Permission.Execute
|
||||
|
||||
## Checks if the given file can be read by the group.
|
||||
## GROUP Metadata
|
||||
Checks if the given file can be read by the group.
|
||||
group_read : Boolean
|
||||
group_read self = self.group.contains Permission.Read
|
||||
|
||||
## Checks if the given file can be written by the group.
|
||||
## GROUP Metadata
|
||||
Checks if the given file can be written by the group.
|
||||
group_write : Boolean
|
||||
group_write self = self.group.contains Permission.Write
|
||||
|
||||
|
@ -19,6 +19,7 @@ from project.Data.Text.Extensions import all
|
||||
polyglot java import org.enso.base.Array_Utils
|
||||
|
||||
## GROUP Output
|
||||
ICON data_output
|
||||
Writes (or appends) the text to the specified file using the supplied
|
||||
encoding. The behavior specified in the `existing_file` parameter will be
|
||||
used if the file exists.
|
||||
@ -64,7 +65,8 @@ Text.write self path encoding=Encoding.utf_8 on_existing_file=Existing_File_Beha
|
||||
stream.write_bytes bytes
|
||||
r.if_not_error file
|
||||
|
||||
## Writes (or appends) the Vector of bytes into the specified file. The behavior
|
||||
## ICON data_output
|
||||
Writes (or appends) the Vector of bytes into the specified file. The behavior
|
||||
specified in the `existing_file` parameter will be used if the file exists.
|
||||
|
||||
Arguments:
|
||||
|
@ -78,7 +78,8 @@ type Column
|
||||
to_js_object : JS_Object
|
||||
to_js_object self = self.to_sql.to_js_object
|
||||
|
||||
## Converts this column into a single-column table.
|
||||
## ICON data_input
|
||||
Converts this column into a single-column table.
|
||||
to_table : Table
|
||||
to_table self =
|
||||
Table.Value self.name self.connection [self.as_internal] self.context
|
||||
@ -92,6 +93,7 @@ type Column
|
||||
info self = self.to_table.info
|
||||
|
||||
## GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Returns a materialized column containing rows of this column.
|
||||
|
||||
Arguments:
|
||||
@ -104,6 +106,7 @@ type Column
|
||||
self.to_table.read max_rows warn_if_more_rows . at 0
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Returns a vector containing all the elements in this column.
|
||||
to_vector : Vector Any
|
||||
to_vector self = self.read max_rows=Nothing . to_vector
|
||||
@ -881,6 +884,7 @@ type Column
|
||||
self.make_binary_op "DECIMAL_MOD" other new_name
|
||||
|
||||
## GROUP Standard.Base.Logical
|
||||
ICON preparation
|
||||
Returns a column of first non-`Nothing` value on each row of `self` and
|
||||
`values` list.
|
||||
|
||||
@ -1015,6 +1019,7 @@ type Column
|
||||
|
||||
## ALIAS fill missing, if_nothing
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
|
||||
Returns a new column where missing values have been replaced with the
|
||||
provided default.
|
||||
@ -1044,6 +1049,7 @@ type Column
|
||||
|
||||
## ALIAS fill empty, if_empty
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
|
||||
Returns a new column where empty Text values have been replaced with the
|
||||
provided default.
|
||||
@ -1070,6 +1076,7 @@ type Column
|
||||
result.rename self.name
|
||||
|
||||
## GROUP Standard.Base.Metadata
|
||||
ICON text_input
|
||||
Returns a new column, containing the same elements as `self`, but with
|
||||
the given name.
|
||||
|
||||
@ -1110,6 +1117,7 @@ type Column
|
||||
|
||||
## ALIAS first, last, sample, slice
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Column with the specified range of rows from the input
|
||||
Column.
|
||||
|
||||
@ -1120,6 +1128,7 @@ type Column
|
||||
take self range=(First 1) = self.to_table.take range . at 0
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Column from the input with the specified range of rows
|
||||
removed.
|
||||
|
||||
@ -1130,6 +1139,7 @@ type Column
|
||||
drop self range=(First 1) = self.to_table.drop range . at 0
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON preparation
|
||||
Checks for each element of the column if it starts with `other`.
|
||||
|
||||
Arguments:
|
||||
@ -1147,6 +1157,7 @@ type Column
|
||||
make_text_case_op self "starts_with" other case_sensitivity new_name
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON preparation
|
||||
Checks for each element of the column if it ends with `other`.
|
||||
|
||||
Arguments:
|
||||
@ -1204,6 +1215,7 @@ type Column
|
||||
self.make_binary_op "LIKE" pattern new_name
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON dataframe_map_column
|
||||
This function removes the specified characters, by default any
|
||||
whitespace, from the start, the end, or both ends of the input.
|
||||
|
||||
@ -1225,6 +1237,7 @@ type Column
|
||||
Error.throw (Unsupported_Database_Operation.Error ("`Column.trim "+where.to_text+"` is not supported by this connection."))
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON dataframe_map_column
|
||||
Replaces the first, or all occurrences of `term` with `new_text` in each
|
||||
row. If `term` is empty, the function returns the table unchanged.
|
||||
|
||||
@ -1346,6 +1359,7 @@ type Column
|
||||
simple_unary_op self "minute"
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Gets the second as an integer (0-60) from the time stored in the column.
|
||||
|
||||
Applies only to columns that hold the `Time_Of_Day` or `Date_Time` types.
|
||||
@ -1492,6 +1506,7 @@ type Column
|
||||
Column.Value new_name self.connection new_type_ref new_expr self.context
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Parses a text column into values.
|
||||
|
||||
In the Database backends, the default formatting settings of the
|
||||
@ -1543,6 +1558,7 @@ type Column
|
||||
self.internal_do_cast type on_problems
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Formatting values is not supported in database columns.
|
||||
@locale Locale.default_widget
|
||||
format : Text | Date_Time_Formatter | Column | Nothing -> Locale -> Column ! Illegal_Argument
|
||||
@ -1551,6 +1567,7 @@ type Column
|
||||
Error.throw <| Unsupported_Database_Operation.Error "`Column.format` is not implemented yet for the Database backends."
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Cast the column to a specific type.
|
||||
|
||||
Arguments:
|
||||
@ -1626,6 +1643,7 @@ type Column
|
||||
Column.Value new_column.name self.connection new_column.sql_type_reference new_column.expression self.context
|
||||
|
||||
## ALIAS transform column
|
||||
ICON dataframe_map_column
|
||||
|
||||
Applies `function` to each item in this column and returns the column
|
||||
of results.
|
||||
@ -1659,6 +1677,7 @@ type Column
|
||||
Error.throw <| Unsupported_Database_Operation.Error "`Column.map` is not supported in the Database backends."
|
||||
|
||||
## ALIAS combine, join by row position, merge
|
||||
ICON dataframes_join
|
||||
|
||||
Applies `function` to consecutive pairs of elements of `self` and `that`
|
||||
and returns a column of results.
|
||||
|
@ -114,6 +114,7 @@ type Table
|
||||
False -> self.to_sql.to_js_object
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns the column with the given name.
|
||||
|
||||
Arguments:
|
||||
@ -124,7 +125,8 @@ type Table
|
||||
_ : Integer -> self.make_column (self.internal_columns.at selector)
|
||||
_ -> self.get selector (Error.throw (No_Such_Column.Error selector))
|
||||
|
||||
## Returns the column with the given name or index.
|
||||
## ICON select_column
|
||||
Returns the column with the given name or index.
|
||||
|
||||
Arguments:
|
||||
- selector: The name or index of the column being looked up.
|
||||
@ -139,16 +141,19 @@ type Table
|
||||
if internal_column.is_nothing then if_missing else self.make_column internal_column
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Gets the first column.
|
||||
first_column : Column ! Index_Out_Of_Bounds
|
||||
first_column self = self.at 0
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Gets the second column
|
||||
second_column : Column ! Index_Out_Of_Bounds
|
||||
second_column self = self.at 1
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Gets the last column
|
||||
last_column : Column ! Index_Out_Of_Bounds
|
||||
last_column self = self.at -1
|
||||
@ -216,6 +221,7 @@ type Table
|
||||
|
||||
## ALIAS drop_columns
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns a new table with the chosen set of columns, as specified by the
|
||||
`columns`, removed from the input table. Any unmatched input columns will
|
||||
be kept in the output. Columns are returned in the same order as in the
|
||||
@ -269,6 +275,7 @@ type Table
|
||||
|
||||
## ALIAS select_missing_columns, select_na
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
|
||||
Select columns which are either all blank or contain blank values. If no
|
||||
rows are present, all columns are considered blank.
|
||||
@ -295,6 +302,7 @@ type Table
|
||||
|
||||
## ALIAS drop_missing_columns, drop_na
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
|
||||
Remove columns which are either all blank or contain blank values. If no
|
||||
rows are present, all columns are considered blank.
|
||||
@ -320,6 +328,7 @@ type Table
|
||||
self.updated_columns new_columns
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns a new table with the specified selection of columns moved to
|
||||
either the start or the end in the specified order.
|
||||
|
||||
@ -374,6 +383,7 @@ type Table
|
||||
self.updated_columns new_columns
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns a new table with the columns sorted by name according to the
|
||||
specified sort method. By default, sorting will be according to
|
||||
case-sensitive ascending order based on the normalized Unicode ordering.
|
||||
@ -402,6 +412,7 @@ type Table
|
||||
self.updated_columns new_columns
|
||||
|
||||
## GROUP Standard.Base.Metadata
|
||||
ICON table_edit
|
||||
Returns a new table with the columns renamed based on either a mapping
|
||||
from the old name to the new or a positional list of new names.
|
||||
|
||||
@ -470,6 +481,7 @@ type Table
|
||||
self.updated_columns (self.internal_columns.map c-> c.rename (names.at c.name))
|
||||
|
||||
## GROUP Standard.Base.Metadata
|
||||
ICON table_edit
|
||||
Returns a new table with the columns renamed based on entries in the
|
||||
first row.
|
||||
|
||||
@ -510,6 +522,7 @@ type Table
|
||||
|
||||
## ALIAS filter rows
|
||||
GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
|
||||
Selects only the rows of this table that correspond to `True` values of
|
||||
`filter`.
|
||||
@ -583,6 +596,7 @@ type Table
|
||||
|
||||
## ALIAS filter rows
|
||||
GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
|
||||
Selects only the rows of this table that correspond to `True` values of
|
||||
`filter`.
|
||||
@ -620,6 +634,7 @@ type Table
|
||||
|
||||
## ALIAS first, last, sample, slice
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Table with the specified range of rows from the input
|
||||
Table.
|
||||
|
||||
@ -650,6 +665,7 @@ type Table
|
||||
Take_Drop_Helpers.take_drop_helper Take_Drop.Take self range
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Table from the input with the specified range of rows
|
||||
removed.
|
||||
|
||||
@ -686,6 +702,7 @@ type Table
|
||||
|
||||
## ALIAS add index column, rank, record id
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
Adds a new column to the table enumerating the rows.
|
||||
|
||||
Arguments:
|
||||
@ -795,6 +812,7 @@ type Table
|
||||
|
||||
## ALIAS add column, new column, update column
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
Sets the column value at the given name.
|
||||
|
||||
Arguments:
|
||||
@ -972,18 +990,21 @@ type Table
|
||||
self.read max_rows=max_rows warn_if_more_rows=warn_if_more_rows . rows
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the first row of the table.
|
||||
first_row : Row ! Index_Out_Of_Bounds
|
||||
first_row self =
|
||||
self.read max_rows=1 warn_if_more_rows=False . rows . first
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the second row of the table.
|
||||
second_row : Row ! Index_Out_Of_Bounds
|
||||
second_row self =
|
||||
self.read max_rows=2 warn_if_more_rows=False . rows . second
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the last row of the table.
|
||||
|
||||
In the database backend, this function has to scan through all the
|
||||
@ -1107,6 +1128,7 @@ type Table
|
||||
_ -> Nothing
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
Returns the distinct set of rows within the specified columns from the
|
||||
input table.
|
||||
|
||||
@ -1149,6 +1171,7 @@ type Table
|
||||
problem_builder.attach_problems_before on_problems new_table
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON join
|
||||
Joins two tables according to the specified join conditions.
|
||||
|
||||
Arguments:
|
||||
@ -1285,6 +1308,7 @@ type Table
|
||||
|
||||
## ALIAS cartesian join
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON join
|
||||
Joins tables by pairing every row of the left table with every row of the
|
||||
right table.
|
||||
|
||||
@ -1336,6 +1360,7 @@ type Table
|
||||
self.join_or_cross_join right join_kind=Join_Kind_Cross.Cross on=[] right_prefix on_problems
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON join
|
||||
Replaces values in this table by values from a lookup table.
|
||||
New values are looked up in the lookup table based on the `key_columns`.
|
||||
Columns found in the lookup table values are replaced by values from the
|
||||
@ -1395,6 +1420,7 @@ type Table
|
||||
|
||||
## ALIAS join by row position
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON dataframes_join
|
||||
Joins two tables by zipping rows from both tables table together - the
|
||||
first row of the left table is correlated with the first one of the right
|
||||
one etc.
|
||||
@ -1446,6 +1472,7 @@ type Table
|
||||
|
||||
## ALIAS append, concat
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON dataframes_union
|
||||
Appends records from other table(s) to this table.
|
||||
|
||||
Arguments:
|
||||
@ -1602,6 +1629,7 @@ type Table
|
||||
|
||||
## ALIAS group by, summarize
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON sigma
|
||||
|
||||
Aggregates the rows in a table using any `Group_By` entries in columns.
|
||||
The columns argument specifies which additional aggregations to perform and to return.
|
||||
@ -1710,6 +1738,7 @@ type Table
|
||||
self.updated_context_and_columns new_ctx new_columns subquery=True
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON dataframe_map_row
|
||||
Returns a new table with a chosen subset of columns left unchanged and
|
||||
the other columns pivoted to rows with a single name field and a single
|
||||
value field.
|
||||
@ -1766,6 +1795,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error msg)
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON dataframe_map_column
|
||||
Returns a new table using a chosen field as the column header and then
|
||||
aggregating the rows within each value as specified. Optionally, a set of
|
||||
fields can be used to group the rows.
|
||||
@ -1827,6 +1857,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error msg)
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Parses columns within a Table to a specific value type.
|
||||
By default, it looks at all `Text` columns and attempts to deduce the
|
||||
type (columns with other types are not affected).
|
||||
@ -1887,6 +1918,7 @@ type Table
|
||||
table.set new_column new_name=column_to_parse.name set_mode=Set_Mode.Update
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Formats `Column`s within a `Table` using a format string,
|
||||
`Date_Time_Formatter`, or `Column` of format strings.
|
||||
|
||||
@ -1966,6 +1998,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.format is not implemented yet for the Database backends.")
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Splits a column of text into a set of new columns.
|
||||
The original column will be removed from the table.
|
||||
The new columns will be named with the name of the input column with a
|
||||
@ -1989,6 +2022,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.split_to_columns is not implemented yet for the Database backends.")
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Splits a column of text into a set of new rows.
|
||||
The values of other columns are repeated for the new rows.
|
||||
|
||||
@ -2003,6 +2037,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.split_to_rows is not implemented yet for the Database backends.")
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Tokenizes a column of text into a set of new columns using a regular
|
||||
expression.
|
||||
If the pattern contains marked groups, the values are concatenated
|
||||
@ -2030,6 +2065,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.tokenize_to_columns is not implemented yet for the Database backends.")
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Tokenizes a column of text into a set of new rows using a regular
|
||||
expression.
|
||||
If the pattern contains marked groups, the values are concatenated
|
||||
@ -2051,6 +2087,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.tokenize_to_rows is not implemented yet for the Database backends.")
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Converts a Text column into new columns using a regular expression
|
||||
pattern.
|
||||
|
||||
@ -2082,6 +2119,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.parse_to_columns is not implemented yet for the Database backends.")
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON split_text
|
||||
Expand a column of objects to a new set of columns.
|
||||
|
||||
Arguments:
|
||||
@ -2096,6 +2134,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.expand_column is currently not implemented for the Database backend. You may download the table to memory using `.read` to use this feature.")
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON split_text
|
||||
Expand aggregate values in a column to separate rows.
|
||||
|
||||
For each value in the specified column, if it is an aggregate (`Vector`,
|
||||
@ -2133,6 +2172,7 @@ type Table
|
||||
Error.throw (Unsupported_Database_Operation.Error "Table.expand_to_rows is currently not implemented for the Database backend. You may download the table to memory using `.read` to use this feature.")
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Cast the selected columns to a specific type.
|
||||
|
||||
Returns a new table in which the selected columns are replaced with
|
||||
@ -2203,6 +2243,7 @@ type Table
|
||||
|
||||
## ALIAS drop_missing_rows, dropna
|
||||
GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
Remove rows which are all blank or containing blank values.
|
||||
|
||||
Arguments:
|
||||
@ -2236,6 +2277,7 @@ type Table
|
||||
table.at column_name . at 0
|
||||
|
||||
## GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Returns a materialized dataframe containing rows of this table.
|
||||
|
||||
Arguments:
|
||||
@ -2408,6 +2450,7 @@ type Table
|
||||
to_text self = "(Database Table "+self.name.to_text+")"
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
This function writes the table into a file.
|
||||
|
||||
The specific behavior of the various `File_Format`s is specified below.
|
||||
@ -2471,6 +2514,7 @@ type Table
|
||||
|
||||
## ALIAS fill missing, if_nothing
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_clean
|
||||
|
||||
Returns a new table where missing values in the specified columns have
|
||||
been replaced with the provided default(s).
|
||||
@ -2499,6 +2543,7 @@ type Table
|
||||
|
||||
## ALIAS fill empty, if_empty
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_clean
|
||||
|
||||
Returns a new column where empty Text values have been replaced with the
|
||||
provided default.
|
||||
@ -2525,6 +2570,7 @@ type Table
|
||||
Table_Helpers.replace_columns_with_transformed_columns self columns transformer
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON dataframe_map_column
|
||||
Replaces the first, or all occurrences of `term` with `new_text` in each
|
||||
row of the specified column. If `term` is empty, the function returns the
|
||||
table unchanged.
|
||||
|
@ -12,6 +12,7 @@ from project.Errors import all
|
||||
from project.Internal.Upload_Table import all
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
Creates a new database table from this table.
|
||||
|
||||
Arguments:
|
||||
@ -60,6 +61,7 @@ Table.select_into_database_table self connection (table_name : Text) primary_key
|
||||
select_into_table_implementation self connection table_name primary_key temporary on_problems
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
Updates the database table with the contents of the provided table.
|
||||
|
||||
This operation will only work if this table is a 'trivial' table reference,
|
||||
@ -134,6 +136,7 @@ Table.update_rows self (source_table : Table | In_Memory_Table) (update_action :
|
||||
common_update_table source_table self update_action key_columns error_on_missing_columns on_problems
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
Removes rows from a database table.
|
||||
|
||||
It returns the count of the rows that have been deleted.
|
||||
|
@ -12,6 +12,7 @@ from project.Errors import all
|
||||
from project.Internal.Upload_Table import all
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
Creates a new database table from this in-memory table.
|
||||
|
||||
Arguments:
|
||||
@ -60,6 +61,7 @@ Table.select_into_database_table self connection (table_name : Text) primary_key
|
||||
select_into_table_implementation self connection table_name primary_key temporary on_problems
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
Updates the target table with the contents of this table.
|
||||
|
||||
Arguments:
|
||||
@ -126,6 +128,7 @@ Table.update_rows self (source_table : Database_Table | Table) (update_action :
|
||||
Error.throw (Illegal_Argument.Error "Table.update_rows modifies the underlying table, so it is only supported for Database tables - in-memory tables are immutable. Consider using `join` or `lookup_and_replace` for a similar operation that creates a new Table instead.")
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
Removes rows from a database table.
|
||||
|
||||
It returns the count of the rows that have been deleted.
|
||||
|
@ -144,6 +144,7 @@ type Postgres_Connection
|
||||
query self query alias="" = self.connection.query query alias
|
||||
|
||||
## GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Execute the query and load the results into memory as a Table.
|
||||
|
||||
Arguments:
|
||||
|
@ -137,6 +137,7 @@ type SQLite_Connection
|
||||
query self query alias="" = self.connection.query query alias
|
||||
|
||||
## GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Execute the query and load the results into memory as a Table.
|
||||
|
||||
Arguments:
|
||||
|
@ -43,6 +43,7 @@ type Image
|
||||
Image.Value (Java_Image.from_vector values rows channels)
|
||||
|
||||
## UNSTABLE
|
||||
ICON data_input
|
||||
|
||||
Read an image from a file.
|
||||
|
||||
@ -78,6 +79,7 @@ type Image
|
||||
Error.throw (File_Error.IO_Error (File.new path) 'Failed to read the file')
|
||||
|
||||
## UNSTABLE
|
||||
ICON data_output
|
||||
|
||||
Write an image to a file.
|
||||
|
||||
|
@ -40,6 +40,7 @@ polyglot java import org.enso.table.parsing.problems.ParseProblemAggregator
|
||||
|
||||
type Column
|
||||
## GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Creates a new column given a name and a vector of elements.
|
||||
|
||||
Arguments:
|
||||
@ -943,6 +944,7 @@ type Column
|
||||
simple_unary_op self Java_Storage.Maps.FLOOR
|
||||
|
||||
## GROUP Standard.Base.Logical
|
||||
ICON preparation
|
||||
Returns a column of first non-`Nothing` value on each row of `self` and
|
||||
`values` list.
|
||||
|
||||
@ -1099,6 +1101,7 @@ type Column
|
||||
|
||||
## ALIAS fill missing, if_nothing
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
|
||||
Returns a new column where missing values have been replaced with the
|
||||
provided default.
|
||||
@ -1136,6 +1139,7 @@ type Column
|
||||
|
||||
## ALIAS fill empty, if_empty
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
|
||||
Returns a new column where empty Text values have been replaced with the
|
||||
provided default.
|
||||
@ -1163,6 +1167,7 @@ type Column
|
||||
result.rename self.name
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON preparation
|
||||
Checks for each element of the column if it starts with `other`.
|
||||
|
||||
Arguments:
|
||||
@ -1200,6 +1205,7 @@ type Column
|
||||
run_vectorized_binary_case_text_op self Java_Storage.Maps.STARTS_WITH other case_sensitivity (a -> b -> a.starts_with b case_sensitivity) new_name
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON preparation
|
||||
Checks for each element of the column if it ends with `other`.
|
||||
|
||||
Arguments:
|
||||
@ -1282,6 +1288,7 @@ type Column
|
||||
run_vectorized_binary_op self Java_Storage.Maps.LIKE pattern expected_result_type=Value_Type.Boolean
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON dataframe_map_column
|
||||
This function removes the specified characters, by default any
|
||||
whitespace, from the start, the end, or both ends of the input.
|
||||
|
||||
@ -1305,6 +1312,7 @@ type Column
|
||||
Column.from_vector new_name mapped
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON dataframe_map_column
|
||||
Replaces the first, or all occurrences of `term` with `new_text` in each
|
||||
row. If `term` is empty, the function returns the column unchanged.
|
||||
|
||||
@ -1406,6 +1414,7 @@ type Column
|
||||
simple_unary_op self Java_Storage.Maps.MINUTE
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Gets the second as an integer (0-60) from the time stored in the column.
|
||||
|
||||
Applies only to columns that hold the `Time_Of_Day` or `Date_Time` types.
|
||||
@ -1531,6 +1540,7 @@ type Column
|
||||
run_unary_op self set.contains new_name=result_name skip_nulls=False expected_result_type=Value_Type.Boolean
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Parses a text column into values.
|
||||
|
||||
In the Database backends, the default formatting settings of the
|
||||
@ -1627,6 +1637,7 @@ type Column
|
||||
Column.Value (Java_Column.new self.name new_storage)
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Format a `Column` using a format string (or `Column` of format strings).
|
||||
|
||||
Arguments:
|
||||
@ -1719,6 +1730,7 @@ type Column
|
||||
new_column
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Cast the column to a specific type.
|
||||
|
||||
Arguments:
|
||||
@ -1813,6 +1825,7 @@ type Column
|
||||
self.cast new_value_type on_problems=Problem_Behavior.Report_Error
|
||||
|
||||
## ALIAS transform column
|
||||
ICON dataframe_map_column
|
||||
|
||||
Applies `function` to each item in this column and returns the column
|
||||
of results.
|
||||
@ -1847,6 +1860,7 @@ type Column
|
||||
Column.from_vector self.name new_st value_type=expected_value_type
|
||||
|
||||
## ALIAS combine, join by row position, merge
|
||||
ICON dataframes_join
|
||||
|
||||
Applies `function` to consecutive pairs of elements of `self` and `that`
|
||||
and returns a column of results.
|
||||
@ -1894,6 +1908,7 @@ type Column
|
||||
Column.from_vector new_name vec value_type=expected_value_type
|
||||
|
||||
## GROUP Standard.Base.Metadata
|
||||
ICON text_input
|
||||
Returns a new column, containing the same elements as `self`, but with
|
||||
the given name.
|
||||
|
||||
@ -1960,6 +1975,7 @@ type Column
|
||||
count self = self.length - self.count_nothing
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the value contained in this column at the given index.
|
||||
|
||||
Arguments:
|
||||
@ -1982,7 +1998,8 @@ type Column
|
||||
if storage.isNa index then Nothing else
|
||||
storage.getItem index
|
||||
|
||||
## Returns a column containing rows of this column.
|
||||
## ICON data_input
|
||||
Returns a column containing rows of this column.
|
||||
|
||||
Arguments:
|
||||
- max_rows: specifies the maximum number of rows to read.
|
||||
@ -1995,6 +2012,7 @@ type Column
|
||||
self.to_table.read max_rows warn_if_more_rows . at 0
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Returns a vector containing all the elements in this column.
|
||||
|
||||
> Example
|
||||
@ -2045,7 +2063,8 @@ type Column
|
||||
storage_json = Vector.from_polyglot_array storage_proxy
|
||||
JS_Object.from_pairs [["name", name], ["data", storage_json]]
|
||||
|
||||
## Converts this column into a single-column table.
|
||||
## ICON data_input
|
||||
Converts this column into a single-column table.
|
||||
|
||||
> Example
|
||||
Convert a column to a table.
|
||||
@ -2124,6 +2143,7 @@ type Column
|
||||
|
||||
## ALIAS first, last, sample, slice
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Column with the specified range of rows from the input
|
||||
Column.
|
||||
|
||||
@ -2135,6 +2155,7 @@ type Column
|
||||
Index_Sub_Range_Module.take_helper self.length self.at self.slice (slice_ranges self) range
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Column from the input with the specified range of rows
|
||||
removed.
|
||||
|
||||
@ -2155,6 +2176,7 @@ type Column
|
||||
Column.Value (self.java_column.slice offset limit)
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the first element in the column, if it exists.
|
||||
|
||||
If the column is empty, this method will return a dataflow error
|
||||
@ -2170,6 +2192,7 @@ type Column
|
||||
first self = self.at 0
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the last element in the column, if it exists.
|
||||
|
||||
If the column is empty, this method will return a dataflow error
|
||||
|
@ -4,6 +4,7 @@ import project.Data.Column.Column
|
||||
import project.Data.Table.Table
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON data_input
|
||||
Creates a column from a `Vector` of values.
|
||||
|
||||
Arguments:
|
||||
@ -31,7 +32,7 @@ Date_Range.to_column self name="Date_Range" =
|
||||
Column.from_vector name self.to_vector
|
||||
|
||||
## ALIAS count, kurtosis, maximum, mean, median, minimum, mode, skew, standard_deviation, statistic, sum, variance
|
||||
GROUP Standard.Base.Trigonometry
|
||||
GROUP Standard.Base.Statistics
|
||||
Compute a single statistic on the column.
|
||||
|
||||
Arguments:
|
||||
@ -52,7 +53,7 @@ Column.compute_bulk self statistics=[Statistic.Count, Statistic.Sum] =
|
||||
Table.from_rows names [values]
|
||||
|
||||
## ALIAS count, kurtosis, maximum, mean, median, minimum, mode, skew, standard_deviation, statistic, sum, variance
|
||||
GROUP Standard.Base.Trigonometry
|
||||
GROUP Standard.Base.Statistics
|
||||
Compute a single running statistic on the column.
|
||||
|
||||
Arguments:
|
||||
|
@ -81,6 +81,7 @@ polyglot java import org.enso.table.parsing.problems.ParseProblemAggregator
|
||||
## Represents a column-oriented table data structure.
|
||||
type Table
|
||||
## GROUP Standard.Base.Constants
|
||||
ICON data_output
|
||||
Creates a new table from a vector of `[name, items]` pairs.
|
||||
|
||||
Arguments:
|
||||
@ -122,6 +123,7 @@ type Table
|
||||
Table.Value (Java_Table.new cols)
|
||||
|
||||
## GROUP Standard.Base.Constants
|
||||
ICON data_input
|
||||
Creates a new table from a vector of column names and a vector of vectors
|
||||
specifying row contents.
|
||||
|
||||
@ -222,6 +224,7 @@ type Table
|
||||
rows
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns the column with the given name.
|
||||
|
||||
Arguments:
|
||||
@ -248,7 +251,8 @@ type Table
|
||||
Column.Value (java_columns.at selector)
|
||||
_ -> self.get selector (Error.throw (No_Such_Column.Error selector))
|
||||
|
||||
## Returns the column with the given name or index.
|
||||
## ICON select_column
|
||||
Returns the column with the given name or index.
|
||||
|
||||
Arguments:
|
||||
- selector: The name or index of the column being looked up.
|
||||
@ -277,16 +281,19 @@ type Table
|
||||
if java_column.is_nothing then if_missing else Column.Value java_column
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Gets the first column.
|
||||
first_column : Column ! Index_Out_Of_Bounds
|
||||
first_column self = self.at 0
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Gets the second column
|
||||
second_column : Column ! Index_Out_Of_Bounds
|
||||
second_column self = self.at 1
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Gets the last column
|
||||
last_column : Column ! Index_Out_Of_Bounds
|
||||
last_column self = self.at -1
|
||||
@ -355,6 +362,7 @@ type Table
|
||||
|
||||
## ALIAS drop_columns
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns a new table with the chosen set of columns, as specified by the
|
||||
`columns`, removed from the input table. Any unmatched input columns will
|
||||
be kept in the output. Columns are returned in the same order as in the
|
||||
@ -408,6 +416,7 @@ type Table
|
||||
|
||||
## ALIAS select_missing_columns, select_na
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
|
||||
Select columns which are either all blank or contain blank values. If no
|
||||
rows are present, all columns are considered blank.
|
||||
@ -434,6 +443,7 @@ type Table
|
||||
|
||||
## ALIAS drop_missing_columns, drop_na
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
|
||||
Remove columns which are either all blank or contain blank values. If no
|
||||
rows are present, all columns are considered blank.
|
||||
@ -459,6 +469,7 @@ type Table
|
||||
Table.new new_columns
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns a new table with the specified selection of columns moved to
|
||||
either the start or the end in the specified order.
|
||||
|
||||
@ -513,6 +524,7 @@ type Table
|
||||
Table.new new_columns
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_column
|
||||
Returns a new table with the columns sorted by name according to the
|
||||
specified sort method. By default, sorting will be according to
|
||||
case-sensitive ascending order based on the normalized Unicode ordering.
|
||||
@ -541,6 +553,7 @@ type Table
|
||||
Table.new new_columns
|
||||
|
||||
## GROUP Standard.Base.Metadata
|
||||
ICON table_edit
|
||||
Returns a new table with the columns renamed based on either a mapping
|
||||
from the old name to the new or a positional list of new names.
|
||||
|
||||
@ -609,6 +622,7 @@ type Table
|
||||
Table.new (self.columns.map c-> c.rename (names.at c.name))
|
||||
|
||||
## GROUP Standard.Base.Metadata
|
||||
ICON table_edit
|
||||
Returns a new table with the columns renamed based on entries in the
|
||||
first row.
|
||||
|
||||
@ -639,6 +653,7 @@ type Table
|
||||
|
||||
## ALIAS group by, summarize
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON sigma
|
||||
|
||||
Aggregates the rows in a table using any `Group_By` entries in columns.
|
||||
The columns argument specifies which additional aggregations to perform and to return.
|
||||
@ -792,6 +807,7 @@ type Table
|
||||
Table.Value java_table
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
Returns the distinct set of rows within the specified columns from the
|
||||
input table.
|
||||
|
||||
@ -840,6 +856,7 @@ type Table
|
||||
Table.Value java_table
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Parses columns within a `Table` to a specific value type.
|
||||
By default, it looks at all `Text` columns and attempts to deduce the
|
||||
type (columns with other types are not affected).
|
||||
@ -963,6 +980,7 @@ type Table
|
||||
Table.new new_columns
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Formats `Column`s within a `Table` using a format string,
|
||||
`Date_Time_Formatter`, or `Column` of format strings.
|
||||
|
||||
@ -1055,6 +1073,7 @@ type Table
|
||||
Table.new new_columns
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Cast the selected columns to a specific type.
|
||||
|
||||
Returns a new table in which the selected columns are replaced with
|
||||
@ -1162,6 +1181,7 @@ type Table
|
||||
table.set new_column new_name=column_to_cast.name set_mode=Set_Mode.Update
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Splits a column of text into a set of new columns.
|
||||
The original column will be removed from the table.
|
||||
The new columns will be named with the name of the input column with a
|
||||
@ -1184,6 +1204,7 @@ type Table
|
||||
Split_Tokenize.split_to_columns self column delimiter column_count on_problems
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Splits a column of text into a set of new rows.
|
||||
The values of other columns are repeated for the new rows.
|
||||
|
||||
@ -1197,6 +1218,7 @@ type Table
|
||||
Split_Tokenize.split_to_rows self column delimiter
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Tokenizes a column of text into a set of new columns using a regular
|
||||
expression.
|
||||
If the pattern contains marked groups, the values are concatenated
|
||||
@ -1223,6 +1245,7 @@ type Table
|
||||
Split_Tokenize.tokenize_to_columns self column pattern case_sensitivity column_count on_problems
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Tokenizes a column of text into a set of new rows using a regular
|
||||
expression.
|
||||
If the pattern contains marked groups, the values are concatenated
|
||||
@ -1243,6 +1266,7 @@ type Table
|
||||
Split_Tokenize.tokenize_to_rows self column pattern case_sensitivity at_least_one_row
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON split_text
|
||||
Converts a Text column into new columns using a regular expression
|
||||
pattern.
|
||||
|
||||
@ -1273,6 +1297,7 @@ type Table
|
||||
Split_Tokenize.parse_to_columns self column pattern case_sensitivity parse_values on_problems
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON split_text
|
||||
Expand a column of objects to a new set of columns.
|
||||
|
||||
Arguments:
|
||||
@ -1286,6 +1311,7 @@ type Table
|
||||
Expand_Objects_Helpers.expand_column self column fields prefix
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON split_text
|
||||
Expand aggregate values in a column to separate rows.
|
||||
|
||||
For each value in the specified column, if it is an aggregate (`Vector`,
|
||||
@ -1323,6 +1349,7 @@ type Table
|
||||
|
||||
## ALIAS filter rows
|
||||
GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
|
||||
Selects only the rows of this table that correspond to `True` values of
|
||||
`filter`.
|
||||
@ -1387,6 +1414,7 @@ type Table
|
||||
|
||||
## ALIAS filter rows
|
||||
GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
|
||||
Selects only the rows of this table that correspond to `True` values of
|
||||
`filter`.
|
||||
@ -1424,6 +1452,7 @@ type Table
|
||||
|
||||
## ALIAS first, last, sample, slice
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Table with the specified range of rows from the input
|
||||
Table.
|
||||
|
||||
@ -1454,6 +1483,7 @@ type Table
|
||||
Index_Sub_Range_Module.take_helper self.row_count self.rows.at self.slice (slice_ranges self) range
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Table from the input with the specified range of rows
|
||||
removed.
|
||||
|
||||
@ -1490,6 +1520,7 @@ type Table
|
||||
|
||||
## ALIAS add index column, rank, record id
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
Adds a new column to the table enumerating the rows.
|
||||
|
||||
Arguments:
|
||||
@ -1527,6 +1558,7 @@ type Table
|
||||
|
||||
## ALIAS add column, new column, update column
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_map_column
|
||||
Sets the column value at the given name.
|
||||
|
||||
Arguments:
|
||||
@ -1682,6 +1714,7 @@ type Table
|
||||
Vector.from_polyglot_array (Array_Proxy.from_proxy_object proxy)
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the first row of the table.
|
||||
|
||||
In the database backend, it first materializes the table to in-memory.
|
||||
@ -1691,6 +1724,7 @@ type Table
|
||||
Row.Value self 0
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the second row of the table.
|
||||
|
||||
In the database backend, it first materializes the table to in-memory.
|
||||
@ -1700,6 +1734,7 @@ type Table
|
||||
Row.Value self 1
|
||||
|
||||
## GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Returns the last row of the table.
|
||||
|
||||
In the database backend, it first materializes the table to in-memory.
|
||||
@ -1709,6 +1744,7 @@ type Table
|
||||
Row.Value self (self.row_count-1)
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON join
|
||||
Joins two tables according to the specified join conditions.
|
||||
|
||||
Arguments:
|
||||
@ -1796,6 +1832,7 @@ type Table
|
||||
|
||||
## ALIAS cartesian join
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON join
|
||||
Joins tables by pairing every row of the left table with every row of the
|
||||
right table.
|
||||
|
||||
@ -1841,6 +1878,7 @@ type Table
|
||||
Table.Value new_java_table
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON join
|
||||
Replaces values in this table by values from a lookup table.
|
||||
New values are looked up in the lookup table based on the `key_columns`.
|
||||
Columns found in the lookup table values are replaced by values from the
|
||||
@ -1929,6 +1967,7 @@ type Table
|
||||
|
||||
## ALIAS join by row position
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON dataframes_join
|
||||
Joins two tables by zipping rows from both tables table together - the
|
||||
first row of the left table is correlated with the first one of the right
|
||||
one etc.
|
||||
@ -1995,6 +2034,7 @@ type Table
|
||||
|
||||
## ALIAS append, concat
|
||||
GROUP Standard.Base.Calculations
|
||||
ICON dataframes_union
|
||||
Appends records from other table(s) to this table.
|
||||
|
||||
Arguments:
|
||||
@ -2104,6 +2144,7 @@ type Table
|
||||
|
||||
## ALIAS drop_missing_rows, dropna
|
||||
GROUP Standard.Base.Selections
|
||||
ICON preparation
|
||||
Remove rows which are all blank or containing blank values.
|
||||
|
||||
Arguments:
|
||||
@ -2131,7 +2172,8 @@ type Table
|
||||
row_count : Integer
|
||||
row_count self = self.java_table.rowCount
|
||||
|
||||
## Returns a materialized dataframe containing rows of this table.
|
||||
## ICON data_input
|
||||
Returns a materialized dataframe containing rows of this table.
|
||||
|
||||
In the in-memory backend, this returns the same table, truncated to
|
||||
`max_rows`. This is only kept for API compatibility between database and
|
||||
@ -2171,6 +2213,7 @@ type Table
|
||||
Table.new [["Column", cols.map .name], ["Items Count", cols.map .count], ["Value Type", cols.map .value_type]]
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON dataframe_map_row
|
||||
Returns a new table with a chosen subset of columns left unchanged and
|
||||
the other columns pivoted to rows with a single name field and a single
|
||||
value field.
|
||||
@ -2242,6 +2285,7 @@ type Table
|
||||
problem_builder.attach_problems_after on_problems result
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON dataframe_map_column
|
||||
Returns a new table using a chosen field as the column header and then
|
||||
aggregating the rows within each value as specified. Optionally, a set of
|
||||
fields can be used to group the rows.
|
||||
@ -2383,6 +2427,7 @@ type Table
|
||||
Table.Value <| self.java_table.applyMask mask
|
||||
|
||||
## GROUP Standard.Base.Output
|
||||
ICON data_output
|
||||
This function writes a table from memory into a file.
|
||||
|
||||
The specific behavior of the various `File_Format`s is specified below.
|
||||
@ -2474,6 +2519,7 @@ type Table
|
||||
|
||||
## ALIAS fill missing, if_nothing
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_clean
|
||||
|
||||
Returns a new table where missing values in the specified columns have
|
||||
been replaced with the provided default(s).
|
||||
@ -2502,6 +2548,7 @@ type Table
|
||||
|
||||
## ALIAS fill empty, if_empty
|
||||
GROUP Standard.Base.Values
|
||||
ICON dataframe_clean
|
||||
|
||||
Returns a new column where empty Text values have been replaced with the
|
||||
provided default(s).
|
||||
@ -2528,6 +2575,7 @@ type Table
|
||||
Table_Helpers.replace_columns_with_transformed_columns self columns transformer
|
||||
|
||||
## GROUP Standard.Base.Text
|
||||
ICON dataframe_map_column
|
||||
Replaces the first, or all occurrences of `term` with `new_text` in each
|
||||
row of the specified column. If `term` is empty, the function returns the
|
||||
table unchanged.
|
||||
|
@ -155,6 +155,7 @@ type Excel_Workbook
|
||||
|
||||
## ALIAS range, sheet, worksheet
|
||||
GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Execute the query and load the results into memory as a Table.
|
||||
|
||||
Arguments:
|
||||
@ -172,6 +173,7 @@ type Excel_Workbook
|
||||
Table.Value java_table
|
||||
|
||||
## GROUP Standard.Base.Input
|
||||
ICON data_input
|
||||
Read an Excel_Section from the Workbook
|
||||
|
||||
Arguments:
|
||||
@ -201,7 +203,7 @@ type Excel_Workbook
|
||||
_ : Text -> ExcelReader.readRangeByName self.workbook address java_headers skip_rows row_limit java_problem_aggregator
|
||||
Table.Value java_table
|
||||
|
||||
## ALIAS worksheet, get
|
||||
## ALIAS get, worksheet
|
||||
GROUP Standard.Base.Input
|
||||
Reads a worksheet from the workbook.
|
||||
|
||||
|
@ -13,6 +13,7 @@ import project.Internal.Parse_To_Table
|
||||
import project.Internal.Widget_Helpers
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
Converts this `Vector` into a `Table`.
|
||||
|
||||
Arguments:
|
||||
@ -23,6 +24,7 @@ Vector.to_table self fields=Nothing =
|
||||
Table.from_objects self fields
|
||||
|
||||
## GROUP Standard.Base.Constants
|
||||
ICON data_input
|
||||
Converts an object or a Vector of object into a Table, by looking up the
|
||||
requested fields from each item.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user