Home > Enterprise >  How to find whether df column name contains substring in Scala
How to find whether df column name contains substring in Scala

Time:09-17

My df has multiple columns. I want to check whether one column name contains a substring. Such as % in SQL.

I try to use this one but seems not to work. I don't want to give a full name to find whether that column exists.

If I can find this column, I also want to rename the column using .withColumnRename Such like

if (df.columns.contains("           
  • Related