Python Forum
Joining Excel data into existing Excel file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Joining Excel data into existing Excel file
#1
Hi there,

I'm coming back to Python after quite a bit of time away, and I'm facing an issue in trying to bring data from Excel file into another.

For some background, I am currently using Visual Studio Code to write my coding in, as well as two existing Excel files, each with only one sheet of data in them. One of the Excel files, A, is the master file that I'm trying to populate with data from multiple files. The second Excel file, B, contains a large amount of various data that I'm looking to import into file A. Both files, A and B, contain matching data, specifically a "Unit" column, as well as matching data columns headers that I'm trying to populate in A from B. These headers include "PM", "PT", "PD", and "Total". I'm trying to pull over data from file B into these existing columns, but only when the data in "Unit" column matches. For instance, the data will only pull from file B into file A when both have a "Bravo" in the "Unit" column.

I'm aware this is more abstract of an abstract problem as I don't have any code to share, but other than using pandas, openpyxl, and numpy, I'm stuck on how to get started. I understand that I should be importing both files, but where do I go from there? Any help in this would be greatly appreciated. Thanks so much for taking the time to read this and thanks for any help you might have.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Updating formulas in Excel - best solution MasterOfDestr 4 673 Mar-11-2024, 01:02 PM
Last Post: MasterOfDestr
  Python openyxl not updating Excel file MrBean12 1 337 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Excel from SAP - dealing with formats and VBA MasterOfDestr 7 577 Feb-25-2024, 12:23 PM
Last Post: Pedroski55
  Python best library for Excel reports & review of existing code MasterOfDestr 4 655 Feb-14-2024, 03:39 PM
Last Post: MasterOfDestr
  Copy Paste excel files based on the first letters of the file name Viento 2 442 Feb-07-2024, 12:24 PM
Last Post: Viento
  tables in Excel MaartenRo 3 538 Jan-06-2024, 03:46 PM
Last Post: deanhystad
  Search Excel File with a list of values huzzug 4 1,249 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Updating sharepoint excel file odd results cubangt 1 847 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  Python and pandas: Aggregate lines form Excel sheet Glyxbringer 12 1,877 Oct-31-2023, 10:21 AM
Last Post: Pedroski55
  trouble reading string/module from excel as a list popular_dog 0 428 Oct-04-2023, 01:07 PM
Last Post: popular_dog

Forum Jump:

User Panel Messages

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