# Column Header Mapping

```
import pandas as pd

df=pd.read_excel('your_file_name.xlsx')
drop_cols=[,,,]  #list of columns to get rid of
df.drop(drop_cols,axis='columns')

col_dict={'col-a':'col-x','col-b':'col-y','col-c':'col-z'} #however you want to map you new columns in this example abc are old columns and xyz are new ones

#this line will actually rename your columns with the dictionary
df=df.rename(columns=col_dict)

df.to_csv('new_file_name.csv')  #write new file
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.smhuda.com/programming/python/column-header-mapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
