In Pandas, how can I rename a column?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The rename() function can be used to rename columns of a data frame
To rename address_line_1 to ‘region’ and address_line_2 to ‘city’ employees.rename(columns-dict(address_line_1-‘region’, ad-dress_line_2-‘city’))