Skip to main content

Table.remove_blank_columns

remove_blank_columnswhen treat_nans_as_blank

Group: Selections
Aliases: drop_missing_columns, drop_na, select_blank_columns, select_blank_fields, select_missing_columns, select_na

Documentation

Remove columns which are either all blank or contain blank values. If no rows are present, all columns are considered blank.

Arguments

  • when: specifies whether to remove is all cells are blank or if any ones are chosen. By default, only columns consisting of all blank cells are selected.
  • treat_nans_as_blank: specified whether Number.nan is considered as blank. By default, it is not.

Returns

  • A new table with the blank columns removed.

Examples

Remove completely blank columns from a table.

table = Table.from_rows ["bar","foo","buzz","bizz"] [["John", 25,"abc",""]] output = table.remove_blank_columns

Returns a Table

      | bar  | foo | buzz |
|------|-----|------|
| John | 25 | abc |

Errors

  • If there are no columns in the output table, a No_Output_Columns is raised as an error regardless of the problem behavior, because it is not possible to create a table without any columns.

Remarks

What is a blank value?

Blank values are Nothing, "" and depending on setting Number.nan.