I have a dataframe in pyspark which has 15 columns.
The column name are id
, name
, emp.dno
, emp.sal
, state
, emp.city
, zip
.....
Now I want to replace the column names which have '.'
in them to '_'
Like 'emp.dno'
to 'emp_dno'
I would like to do it dynamically
How can I achieve that in pyspark?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…