Append All Columns From One Row Into Another Row
I am trying to append every column from one row into another row, I want to do this for every row, but some row will not have any values, take a look at my code it will be more cle
Solution 1:
Use DataFrame.join
with remove column next_calendarday_nextday
:
df = df.set_index('date')
df = (df.join(df, on='next_calendarday', rsuffix='_nextday')
.drop('next_calendarday_nextday', axis=1))
Post a Comment for "Append All Columns From One Row Into Another Row"