Remove all trailing empty rows.
964233
def trim_empty_rows(self):
    """"""
    if self.nrows != 0:
      row_index = 0
      for row_index, row in enumerate(reversed(self.rows)):
        if not self.is_row_empty(row):
          break
      self.nrows = len(self.rows) - row_index
      self.rows = self.rows[:self.nrows]
    return self
396509
def _clear_empty_values(args):
    '''
    
    '''
    result = {}
    for param in args:
        if args[param] is not None:
            result[param] = args[param]
    return result
1199868
def remove_empties(variable):
    """"""
    import h5py
    for key, val in variable.attrs.items():
        if isinstance(val, h5py._hl.base.Empty):
            variable.attrs.pop(key)

    return variable
976636
def clear(self):
        """"""
        WhereQuery.clear(self)
        self._table = None
        self._parameters = []
        self._sql = None
1282685
private void cleanContentLeadingSpaces()
    {
        if (getContent().length() > 0) {
            if (fPreviousInlineText.length() == 0
                || fPreviousInlineText
                .charAt(fPreviousInlineText.length() - 1) == ' ')
            {
                trimLeadingWhiteSpaces();
            }
        }
    }
1268825
def _filter_rows(self, rows):
        """"""
        filtered_rows = []
        for row in rows:
            filtered_row = []
            for idx, name in enumerate(self.columns.keys()):
                if name in self.visible_columns:
                    filtered_row.append(row[idx])
            filtered_rows.append(filtered_row)
        return filtered_rows
188429
def clear(self):
        
        self.grid = [[EMPTY for dummy_col in range(self.grid_width)] for dummy_row in range(self.grid_height)]
1225848
function trimTrailingLines(value) {
  var val = String(value)
  var index = val.length

  while (val.charAt(--index) === line) {
    /* Empty */
  }

  return val.slice(0, index + 1)
}
686521
def set_empty_for_all(self, row_column_list):
        
        for row, column in row_column_list:
            self.set_empty(row, column)
526369
def __remove_trailing_empty_lines(lines):
        
        lines.reverse()
        tmp = DocBlockReflection.__remove_leading_empty_lines(lines)
        lines.reverse()
        tmp.reverse()

        return tmp
217784
def _remove_blank(l):
        
        ret = []
        for i, _ in enumerate(l):
            if l[i] == 0:
                break
            ret.append(l[i])
        return ret
729904
def scrub(data):
    """"""
    # blanks, Nones, and empty strings can stay as is
    if not data:
        return data
    if isinstance(data, (int, float)):
        return data
    if isinstance(data, list):
        return [scrub(entry) for entry in data]
    if isinstance(data, dict):
        return {scrub(key): scrub(value) for key, value in data.items()}
    try:
        return json.encoder.encode_basestring(data)[1:-1]
    except TypeError as exc:
        raise ValidationError("Input '%s' is not a permitted type: %s" % (data,
                                                                          exc))
    except Exception as exc:
        raise ValidationError("Input '%s' not permitted: %s" % (data, exc))
549532
def trim_trailing_silence(self):
        """"""
        length = self.get_active_length()
        self.pianoroll = self.pianoroll[:length]
148239
def de_blank(val):
    """"""
    ret = list(val)
    if type(val) == list:
        for idx, item in enumerate(val):
            if item.strip() == '':
                ret.remove(item)
            else:
                ret[idx] = item.strip()
    return ret
1266407
def drop_empty_tables(self):
        """"""
        # Count number of rows in each table
        counts = self.count_rows_all()
        drops = []

        # Loop through each table key and validate that rows count is not 0
        for table, count in counts.items():
            if count < 1:
                # Drop table if it contains no rows
                self.drop(table)
                drops.append(table)
        return drops
599689
def clean_line(str, delimiter):
    """"""

    return [x.strip() for x in str.strip().split(delimiter) if x != '']
1306159
def pop_empty_columns(self, empty=None):
        
        empty = ['', None] if empty is None else empty
        if len(self) == 0:
            return
        for col in list(self.columns):
            if self[0][col] in empty:
                if not [v for v in self.get_column(col) if v not in empty]:
                    self.pop_column(col)