-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcleanCsv.py
More file actions
39 lines (29 loc) · 810 Bytes
/
cleanCsv.py
File metadata and controls
39 lines (29 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import csv
import pandas
import replanPackages
from utils import utils
if __name__ == "__main__":
fileName = "3385-reattempts-2024-01-10.csv"
data = []
date = "2024-01-10"
hubName = "3385"
with open(fileName, "r") as file:
reader = csv.reader(file)
for row in reader:
if not str(row).startswith("C/O"):
data.append(row)
dataFrame = pandas.DataFrame(data)
# print(dataFrame)
barcodes = dataFrame[3] # containers column
env = utils.select_env()
orgId = utils.select_org(env)
pkgs = []
barcodes = []
replanPackages.main(
env=env,
orgId=orgId,
keys=[barcodes[i] for i in range(1, len(barcodes))],
keyType="bc",
next_delivery_date=date,
hubName=hubName,
)