wb_purchases_handler 1.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from pydantic import ValidationError
|
||||
from server.backend.pydantic import ExcelInfo
|
||||
import re
|
||||
def process_sheet(df, real_arti = '', real_quantity='', real_sum_1=''):
|
||||
def process_sheet(df, real_arti = 0, real_quantity=0, real_sum_1=0):
|
||||
pattern = r'[A-ZА-Я]{0,1}\d{4}[A-ZА-Я]{1,2}\d{1}' #regex
|
||||
df = df[[real_arti, real_quantity, real_sum_1]].copy().dropna() #copy and drop all NA values
|
||||
df = df[(df != 0).all(axis=1)] #drop all 0 values
|
||||
|
||||
Reference in New Issue
Block a user