Skip to main content

Table.select_blank_columns

select_blank_columnswhen treat_nans_as_blank

Group: Selections
Aliases: drop_empty_rows, drop_missing_rows, dropna, filter_empty_rows, remove_blank_rows, remove_empty_rows, remove_missing_rows

Documentation

Selects 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 of the blank columns.

Examples

Select completely blank columns from a table.

table = Table.from_rows ["bar","foo","buzz","bizz"] [["John", 25,"abc",""]] output = table.select_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.