[Python] Join/Merge two pandas dataframes and filling

Discussão em 'Python' iniciado por Stack, Fevereiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I have two pandas dataframes both holding irregular timeseries data. I want merge/join them by time.

    I also want to forward fill the other columns of frame2 for any "new" rows that were added through the joining process. How can I do this?

    I have tried:

    df = pd.merge(df1, df2, on="DateTime")


    but this just leave a frame with matching timestamp rows.

    Continue reading...

Compartilhe esta Página