def __init__(self): baseFolder = pathInit.getBaseFolder() + "Database\\" loc = baseFolder + "RAA.xlsx" wb = xlrd.open_workbook(loc) sheet = wb.sheet_by_index(0) startRow = 3 rows = sheet.nrows self.productInfoListBusy = [[] for i in range(4) ] #Name, EAN/FSN, Size, MRP cNos = [0, [2, 3, 4], 5, 8] for r in range(startRow, rows): name = sheet.cell_value(r, cNos[0]).strip() for index, c in enumerate(cNos): if name: if index == 1: FSNs = [] for col in cNos[1]: alias = sheet.cell_value(r, col) if alias.startswith("HLM"): FSNs.append(alias) self.productInfoListBusy[index].append(FSNs) else: self.productInfoListBusy[index].append( str(sheet.cell_value(r, c)))
def __init__(self): self.names = [] self.itemsDF = None self.dfNew = [] self.newData = [] self.wordIndex = 0 self.file = pathInit.getBaseFolder() + "\\Bizmate\\notFound.txt" self.existingPhotos = []
def __init__(self): baseFolder = pathInit.getBaseFolder() + "Database\\" loc = baseFolder + "studdsMRPDetailsUpdated.xlsx" df = pandas.read_excel(loc) newColNames = {"BusyName": "Name", "Barcode": "FSN/EAN"} self.mappedDF = df[['BusyName', 'Barcode', 'MRP', 'Size']] self.mappedDF.rename(columns=newColNames, inplace=True) self.mappedDF['FSN/EAN'] = self.mappedDF['FSN/EAN'].str.strip() self.mappedDF['Brand'] = "Studds" self.discount = 1 - 0.28 self.mappedDF[ 'Flipkart Supplier Price'] = self.mappedDF['MRP'] * self.discount
def __init__(self): baseFolder = pathInit.getBaseFolder() + "Database\\" loc = baseFolder + "VEGA MASTER LIST WITH FLIPKART FSN.xlsx" df = pandas.read_excel(loc) newColNames = {"MODEL":"Name","FSN":"FSN/EAN"} self.mappedDF = df.rename(columns = newColNames,inplace=False) self.mappedDF = self.mappedDF[["Name","FSN/EAN","MRP"]] self.mappedDF['Size'] = self.mappedDF['Name'].str.split("-").str[-1] self.mappedDF['FSN/EAN'] = self.mappedDF['FSN/EAN'].str.strip() self.mappedDF['Brand'] = "Vega" self.discount = 1-0.3 self.mappedDF['Flipkart Supplier Price'] = self.mappedDF['MRP'] * self.discount
def __init__(self): baseFolder = pathInit.getBaseFolder() + "Database\\" loc = baseFolder + "AXOR FSN.xlsx" df = pandas.read_excel(loc) newColNames = {"Model Name": "Name", "FSN": "FSN/EAN"} self.mappedDF = df.rename(columns=newColNames, inplace=False) self.mappedDF['Size'] = self.mappedDF['Name'].str.split("-").str[-1] self.mappedDF['FSN/EAN'] = self.mappedDF['FSN/EAN'].str.strip() self.mappedDF['Brand'] = "Axor" self.discount = 1 - 0.33 self.mappedDF[ 'Flipkart Supplier Price'] = self.mappedDF['MRP'] * self.discount
def __init__(self): baseFolder = pathInit.getBaseFolder() + "Database\\" loc = baseFolder + "Flipkart LS2 Database with FSN.xlsx" df = pandas.read_excel(loc, sheet_name=2) newColNames = { "Model Name": "Name", "Total FSN": "FSN/EAN", "DP": "Flipkart Supplier Price" } self.mappedDF = df[['Model Name', 'Total FSN', 'MRP', 'Size', 'DP']] self.mappedDF.rename(columns=newColNames, inplace=True) self.mappedDF['FSN/EAN'] = self.mappedDF['FSN/EAN'].str.strip() self.mappedDF['Brand'] = "LS2"
def __init__(self): baseFolder = pathInit.getBaseFolder() + "Database\\" loc = baseFolder + "Steelbird FSN.xlsx" df = pandas.read_excel(loc) newColNames = { "model_name": "Name", "product_id": "FSN/EAN", "size": "Size" } df.columns = df.iloc[4] # To-Do better logic self.mappedDF = df[['model_name', 'product_id', 'MRP', 'size']] self.mappedDF.dropna(subset=["MRP"], inplace=True) self.mappedDF.drop(4, inplace=True) self.mappedDF = self.mappedDF.rename(columns=newColNames, inplace=False) self.mappedDF['FSN/EAN'] = self.mappedDF['FSN/EAN'].str.strip() self.mappedDF['Brand'] = "Steelbird" self.discount = 1 - 0.3392 self.mappedDF[ 'Flipkart Supplier Price'] = self.mappedDF['MRP'] * self.discount
def __init__(self, imageName): self.imageName = pathInit.getBaseFolder( ) + 'Temp\\' + imageName + '.png' self.x1, self.y1, self.w, self.h = createTemplate(self.imageName)
def __init__(self): self.driver = webdriver.Chrome(pathInit.getBaseFolder() + 'webUtils\\chromedriver91.exe')