Python Forum
update column in one data frame with value of column from another data frame - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: update column in one data frame with value of column from another data frame (/thread-31329.html)



update column in one data frame with value of column from another data frame - flexer - Dec-04-2020

Hi there

In Python 3.7 , I need some help with the syntax of updating data frame with value from another data frame:

I have a trade and it has 2 rows - one for the start and one for the end

I would like to update the start time in end row.

for example - df_start (start trades) and df_end (end trades) - the column position_id is identical between the tow (this column is the key for the 2 data frames)

I need the column time in df_end to change like that : df_end['time'] = df_start['time']



Thanks for the help :)