I am new to Python and Stack Overflow. I am trying to copy data from one Excel file to another Excel file using pandas and numpy.
Let's say, the first.csv contains:
ID | Title | Country | Status | Date | Region |
1 | Project1 | US | Active | 09/29/20 | America |
2 | Project2 | Brazil | Active | America | |
3 | Project3 | China | Active | Asia |
and the second.csv contains:
ID | Title | Country | Region | Date | Status | Description |
1 | Project1 | US | America | N/A | Active | zzz |
4 | Project4 | Canada | America | N/A | Active | zzz |
5 | Project5 | Africa | Africa | N/A | Active | zzz |
In the second file, the Column Status is after Date where as in first file it is after Country. I want to copy the first.csv data to the second.csv file based on the column structure of the second.csv.
After copying I want my second.csv to look like this.
ID | Title | Country | Region | Date | Status | Description |
1 | Project1 | US | America | N/A | Active | zzz |
2 | Project2 | Brazil | America | N/A | Active | zzzzzzz |
3 | Project3 | China | Asia | N/A | Active | zzzzzzzzzzz |
4 | Project4 | Canada | America | N/A | Active | zzz |
5 | Project5 | Africa | Africa | N/A | Active | zzz |
Is there any way to merge/copy the file in this way in Python using numpy and pandas library?