Use reindex to change column order
'''
column_names = ["C", "A", "B"]
df = df.reindex(columns=column_names)
'''
Like below you can add columns to existing dataframe
df[newcolumn]=formula
Can someone help me with transforming the following table using a PYTHON function?
I need 2 new columns: A "follower Type" which will have entries as organic or paid and a "Follower count" which has the values corresponding to the type of follower.
Current Table -




org
organic follower
paid follower
start date
stop date




One
2
0
1634169600000
1634256000000


One
-1
0
1634256000000
1634342400000




Desired Table -




org
start date
stop date
Follower Type
Follower Count




One
1634169600000
1634256000000
Organic
2


One
1634169600000
1634256000000
Paid
0


One
1634256000000
1634342400000
Organic
-1


One
1634256000000
1634342400000
Paid
0




If anybody knows how to do this, please do let me know.
Thanks and Cheers!
How can I do the following dataframe transformation in Python?