Python Forum
update column in one data frame with value of column from another data frame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
update column in one data frame with value of column from another data frame
#1
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 :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with to check an Input list data with a data read from an external source sacharyya 3 390 Mar-09-2024, 12:33 PM
Last Post: Pedroski55
  Adding PD DataFrame column bsben 2 295 Mar-08-2024, 10:46 PM
Last Post: deanhystad
  Get an average of the unique values of a column with group by condition and assign it klllmmm 0 252 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  Help copying a column from a csv to another file with some extras g0nz0uk 3 455 Feb-01-2024, 03:12 PM
Last Post: DeaD_EyE
  Converting column of values into muliple columns of counts highland44 0 249 Feb-01-2024, 12:48 AM
Last Post: highland44
  Python code to set column width 1418 11 1,142 Jan-20-2024, 07:20 AM
Last Post: Pedroski55
  Python Alteryx QS-Passing pandas dataframe column inside SQL query where condition sanky1990 0 722 Dec-04-2023, 09:48 PM
Last Post: sanky1990
  Returning Column and Row Data From Spreadsheet knight2000 0 431 Oct-22-2023, 07:07 AM
Last Post: knight2000
  how do you style data frame that has empty rows. gsaray101 0 522 Sep-08-2023, 05:20 PM
Last Post: gsaray101
  Find a string from a column of one table in another table visedwings049 8 1,158 Sep-07-2023, 03:22 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020