> For the complete documentation index, see [llms.txt](https://wiki.smhuda.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.smhuda.com/programming/python/copy-entire-column-data-to-new-column-pandas.md).

# Copy Entire Column Data To New Column Pandas

### Example 1:

I have an excel file containing a column of 'Usernames' and I want to copy-paste that data into the adjacent column in the same sheet and call it 'Passwords'.&#x20;

```
df = pd.read_excel('testsheet.xlsx')

df['password'] = df['username']

df.to_excel("testsheet.xlsx", index=False)
```
