Working with Python Pandas
In this great tutorial, you will learn how to convert NumPy array to pandas data frame in three simple examples. First, you simple learn how to use the DataFrame class to create a data frame from your array. But as you will see this will not give you any good column names so we'll have a look at how to set the variables name when converting the array. Lastly, you will see how to set the index column as well.
Pandas Tutorial: Renaming Columns in Pandas Dataframe. It is easy to rename your columns in the Pandas dataframe. First, of course, you need to import Pandas. Second, you import your data (e.g., from an Excel file) and, finally, you use df.rename() to change the name of the columns you want new names for.