add column names to dataframe pandas

#suppose team is a df that has unnamed columns (0,1...)
team.columns =['Name', 'Code', 'Age', 'Weight'] 

Here is what the above code is Doing:
1. We’re creating a list of column names.
2. We’re assigning that list to the columns attribute of the DataFrame.

Note that this will only work if the DataFrame has unnamed columns.