Aug-30-2019, 04:49 PM
Hello,
I am new to the python world and am about to embark on my first project. What I am trying to do is essentially replicate a excel macro. I am not using a macro because I have multiple workbooks I need to manipulate. I do know I want to use Pandas to complete this task but being my first time I am a little uncertain of things. Below are the first few steps I need to replicate.
insert a blank column after column P (after the IPPER Plan Code (CBF)column).
Call the column CON/PLAN.
Populate the formula =N14&P14 into cell Q2 of the column. Drag the formula down to populate all cells in the column.
NOTE: Clear contents in #3 below. In FIN_Find_Customer_Invoices_lines_with_Worktags.xlsx, copy the the data from row 13 to bottom.
Go to the current month Custom excel, Worksheet tab. Paste in the copied data (not as values). You will over-write the tab. Make sure columns E, F, and G are formatted as dates in the updated Worksheet tab.
Close the FIN_Find_Customer_Invoices_lines_with_Worktags.xlsx.
Here is what I am starting with:
I am new to the python world and am about to embark on my first project. What I am trying to do is essentially replicate a excel macro. I am not using a macro because I have multiple workbooks I need to manipulate. I do know I want to use Pandas to complete this task but being my first time I am a little uncertain of things. Below are the first few steps I need to replicate.
insert a blank column after column P (after the IPPER Plan Code (CBF)column).
Call the column CON/PLAN.
Populate the formula =N14&P14 into cell Q2 of the column. Drag the formula down to populate all cells in the column.
NOTE: Clear contents in #3 below. In FIN_Find_Customer_Invoices_lines_with_Worktags.xlsx, copy the the data from row 13 to bottom.
Go to the current month Custom excel, Worksheet tab. Paste in the copied data (not as values). You will over-write the tab. Make sure columns E, F, and G are formatted as dates in the updated Worksheet tab.
Close the FIN_Find_Customer_Invoices_lines_with_Worktags.xlsx.
Here is what I am starting with:
import pandas as pd file_name = C:\Users\u678153\Desktop\FIN_Find_Customer_Invoices_lines_with_Worktags.xlsx df = pd.read_excel(file_name) #Read Excel file as a DataFrameI would appreciate any guidance