整个代码在我以前的笔记本电脑中使用,因为我更换了笔记本电脑,我得到了 OSError: [Errno 22] Invalid argument:
#Combine both allocation sheets from shared drive
import pandas as pd
import numpy as np
from datetime import date
import xgboost as xgb
print("Reading Both Files")
New= pd.read_excel(r"Z:\OA\Reena\COPY OF BI REPOSITORY\ALLOCATION\NEW
ALLOCATION Sheet 2018.xlsx",sheet_name="based on AC DC post 2019")
Old= pd.read_excel(r"Z:\OA\Reena\COPY OF BI REPOSITORY\ALLOCATION\ALL
OLD ACCOUNTS.xlsx",sheet_name="Based of acntDC til2018")
print("Reading Both Files Completed")
Allocation = [New,Old]
Allocation = pd.concat(Allocation)
Allocation['Alexa Rank - Global'].fillna('N/A', inplace=True)
Allocation['Alexa Country Rank'].fillna('N/A', inplace=True)
Allocation['Publisher'].fillna('NA', inplace=True)
Allocation.to_excel("Allocation_Dump.xlsx",index = False)
print("Allocation_Dump good to use")