An empty column is one whose only values are NA
or "".
Examples
library('data.table')
d = data.table(w = 3:4, x = c('', 'foo'), y = c(NA, NA), z = c(NA, ''))
drop_empties(d)
#> w x
#> <int> <char>
#> 1: 3
#> 2: 4 foo