Pyspark n00b... How do I replace a column with a substring of itself? I\'m trying to remove a select number of characters from the start and end of string.
f
if the goal is to remove '_' from the column names then I would use list comprehension instead:
df.select( [ col(c).alias(c.replace('_', '') ) for c in df.columns ] )