Editing a df.columns in outside copy

I am trying to make a copy of the columns names , then manipulate these names using a for loop.
in this or loop I want to lower all letter using .lower(), and separate the words using underscore.
how can I do this?

You can do this:

cols = pl.columns.to_list()
cols_modified = []
for col in cols:
     col = col.lower().replace(' ', '_')

Let me know if it worked.