strange question here but I was trying to create an empty dataframe with the following code. I want the columns to be in the order that I wrote them but when output they are in a different order. Is there a reason why this is happening intuitively?
import pandas as pd
user_df = pd.DataFrame(columns={'NAME',
'AGE',
'EMAIL',
'PASSWORD',
'FAVORITE_TEAM'
})
user_df
Output:
PASSWORD EMAIL AGE NAME FAVORITE_TEAM