code: public int columnIndex(String columnName) {
          for (int i = 0; i < columnCount(); i++) {
              if (columnNames().get(i).equalsIgnoreCase(columnName)) {
                  return i;
              }
          }
          throw new IllegalArgumentException(String.format("Column %s is not present in table %s", columnName, name
                  ()));
      }
docs: Returns the index of the column with the given columnName