Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
my-awesome-project
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c746c4ad
authored
Jul 30, 2024
by
larosa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
resolve
parent
b2056aa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
waldom_data_process_RMB.py
waldom_data_process_RMB.py
View file @
c746c4ad
...
...
@@ -20,20 +20,23 @@ title_map = {
title_arr
=
[
'Manufacturer Name'
,
'Part Number'
,
'Stock EMEA'
,
'Stock USA'
,
'Stock APAC'
,
'Stock CN'
,
'MOQ'
,
'Price Break Qty 1'
,
'Price Break 1'
,
'Price Break Qty 2'
,
'Price Break
2'
,
'Price Break Qty 3'
,
'Price Break 3'
,
'Price Break Qty 4'
,
'Price Break
4'
,
'Price Break Qty 5'
,
'Price Break 5'
,
'Price Break Qty 6'
,
'Price Break
6'
,
'Price Break Qty 7'
,
'Price Break 7'
,
'Price Break Qty 8'
,
'Price Break
8'
,
'Price Break Qty 9'
,
'Price Break 9'
,
'Date Code'
'Price Break Qty 1'
,
'Price Break Qty
2'
,
'Price Break Qty 3'
,
'Price Break Qty
4'
,
'Price Break Qty 5'
,
'Price Break Qty
6'
,
'Price Break Qty 7'
,
'Price Break Qty
8'
,
'Price Break Qty 9'
,
'Date Code'
]
ladder_map
=
{
'Price Break Qty 1'
:
'Price Break 1'
,
'Price Break Qty 2'
:
'Price Break 2'
,
'Price Break Qty 3'
:
''
,
'Price Break Qty 4'
,
'Price Break Qty 5'
,
'Price Break Qty 6'
,
'Price Break Qty 7'
,
'Price Break Qty 8'
,
'Price Break Qty 9'
,
'Price Break Qty 3'
:
'Price Break 3'
,
'Price Break Qty 4'
:
'Price Break 4'
,
'Price Break Qty 5'
:
'Price Break 5'
,
'Price Break Qty 6'
:
'Price Break 6'
,
'Price Break Qty 7'
:
'Price Break 7'
,
'Price Break Qty 8'
:
'Price Break 8'
,
'Price Break Qty 9'
:
'Price Break 9'
,
}
class
HandleCSV
:
...
...
@@ -66,8 +69,9 @@ class HandleCSV:
elif
title_arr
[
j
]
in
ladder_map
:
ladder_item_map
[
'purchases'
]
=
int
(
data
)
ladder_item_map
[
'price_us'
]
=
float
(
0
)
ladder_item_map
[
'price_cn'
]
=
float
()
ladder_item_map
[
'price_cn'
]
=
float
(
df
.
loc
[
i
,
ladder_map
[
title_arr
[
j
]]])
elif
title_arr
[
j
]
==
'Date Code'
:
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment