Python - Pandas
I need to copy year values from a row, and add this value to a column containing day and month values. Also need to do this for 9 years data.
Plus, also, there are informations in rows with years, I want to add them at the end of the dataframe.
new2= pd.DataFrame()
for i in transposed_df[:2:10]:
new2 = new2.append(transposed_df[i], ignore_index=True)
input dataframe:
df = pd.DataFrame([[0,2010,2011], ["01-January",965383,1100827], ["02-February",907046,1048171], ["03-March",960178.0,1106555.0]])
0 1 2
0 0 2010.0 2011.0
1 01-January 965383.0 1100827.0
2 02-February 907046.0 1048171.0
3 03-March 960178.0 1106555.0