Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two dataframes merged
#8
Ok. Managed to get the index back and find the original row via the index. However it is still not doing it (still erroring) so I must still be doing it wrong.... any ideas (I have a headache now)
Final loop is now :
for i,r in checkout.iterrows():
    ind = -1
    f = cleaned[cleaned['atime'].isnull()]
    if f is not None:
        f = f[f['date']==r['date']]
    if f is not None:
        f = f[f['dtime']<r['atime']]
    if f is not None:
        cleaned.iloc[f.index[0]]['atime','arrival','cost']=r['atime','arrival','cost']
Reply


Messages In This Thread
Two dataframes merged - by Ecniv - Jun-04-2019, 06:46 PM
RE: Two dataframes merged - by chisox721 - Jun-05-2019, 06:51 PM
RE: Two dataframes merged - by Ecniv - Jun-06-2019, 06:41 PM
RE: Two dataframes merged - by chisox721 - Jun-06-2019, 07:02 PM
RE: Two dataframes merged - by Ecniv - Jun-06-2019, 08:52 PM
RE: Two dataframes merged - by chisox721 - Jun-15-2019, 08:58 PM
RE: Two dataframes merged - by Ecniv - Jun-11-2019, 07:14 PM
RE: Two dataframes merged - by Ecniv - Jun-11-2019, 08:25 PM
RE: Two dataframes merged - by Ecniv - Jun-12-2019, 08:12 PM
RE: Two dataframes merged - by Ecniv - Jun-13-2019, 06:25 PM
RE: Two dataframes merged - by Ecniv - Jun-16-2019, 09:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merging two DataFrames based on indexes from two other DataFrames lucinda_rigeitti 0 1,756 Jan-16-2020, 08:36 PM
Last Post: lucinda_rigeitti
  Read exel with merged cells and write to another excel SriMekala 0 2,990 Aug-10-2019, 07:14 AM
Last Post: SriMekala
  how read and write merged cells in excel SriMekala 1 15,147 Aug-07-2019, 11:27 PM
Last Post: scidam

Forum Jump:

User Panel Messages

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