Skip to content

Commit

Permalink
Fix defect.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdunkerley committed Feb 14, 2024
1 parent b62a3a0 commit 1e03dec
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2020,13 +2020,9 @@ type Table
@format (make_format_chooser include_number=False)
parse : Vector (Text | Integer | Regex) | Text | Integer | Regex -> Value_Type | Auto -> Text | Data_Formatter -> Boolean -> Problem_Behavior -> Table
parse self columns=(self.columns . filter (c-> c.value_type.is_text) . map .name) type format:(Text|Data_Formatter)='' error_on_missing_columns=True on_problems=Report_Warning =
formatter = case format of
_ : Text -> if format.is_empty then Data_Formatter.Value else Data_Formatter.Value.with_format type format
_ : Data_Formatter -> format

selected = self.columns_helper.select_columns columns Case_Sensitivity.Default reorder=False error_on_missing_columns=error_on_missing_columns on_problems=on_problems error_on_empty=False . map self.make_column
selected.fold self table-> column_to_parse->
new_column = column_to_parse.parse type formatter on_problems
new_column = column_to_parse.parse type format on_problems
table.set new_column new_name=column_to_parse.name set_mode=Set_Mode.Update

## GROUP Standard.Base.Conversions
Expand Down

0 comments on commit 1e03dec

Please sign in to comment.