python - Renaming a column in a df without the need of stating the old name -




i have following df:

                24/08/2017  tests:  ch4                10  h20                 9  nh4                 4  c02                 1  so4                 1 

how rename unique column name without need of stating old name?

the common method know requires state old name of column such as:

df = df.rename(columns={'old_name': 'new_name'} 

how rename column name without need of stating old name ?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -