I have a data frame in python/pyspark with columns id time city zip and so on......
id
time
city
zip
Now I added a new column
If you're working with a large number of columns:
df.select(sorted(df.columns))
You can use select to change the order of the columns:
select
df.select("id","name","time","city")