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
0772db18
authored
Jul 31, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add someline
parent
2550f2e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
waldom_data_process_RMB.py
waldom_data_process_RMB.py
View file @
0772db18
...
...
@@ -46,14 +46,13 @@ class HandleCSV:
logger
.
error
(
"文件
%
s 格式错误"
%
path
)
return
[]
for
i
in
range
(
len
(
df
.
index
.
values
)):
if
i
>
100
:
break
# print(df.loc[i, title_arr[0]])
table
=
dict
()
table
[
'price_is_us'
]
=
False
table
[
'ladder_price'
]
=
[]
table
[
'supplier_name'
]
=
'Waldom人民币'
table
[
'goods_sn'
]
=
''
table
[
'multiple'
]
=
'0'
batch_sn_map
=
dict
()
for
j
in
range
(
len
(
title_arr
)):
ladder_item_map
=
dict
()
...
...
@@ -72,9 +71,9 @@ class HandleCSV:
else
:
table
[
'stock'
]
=
int
(
data
)
elif
title_arr
[
j
]
==
'MOQ'
:
table
[
'moq'
]
=
int
(
data
)
table
[
'moq'
]
=
str
(
data
)
elif
title_arr
[
j
]
in
ladder_map
:
if
len
(
str
(
data
)
.
strip
())
!=
0
and
str
(
data
)
.
strip
()
.
isdigit
()
:
if
len
(
str
(
data
)
.
strip
())
!=
0
and
str
(
data
)
.
strip
()
!=
"nan"
and
str
(
data
)
.
strip
()
!=
"NaN"
:
ladder_item_map
[
'purchases'
]
=
int
(
data
)
ladder_item_map
[
'price_us'
]
=
float
(
0
)
ladder_item_map
[
'price_cn'
]
=
float
(
df
.
loc
[
i
,
ladder_map
[
title_arr
[
j
]]])
...
...
@@ -113,7 +112,7 @@ class HandleCSV:
if
__name__
==
'__main__'
:
start
=
time
.
time
()
HandleCSV
()
.
parse
(
'Tianyang_Inventory_Feed_RMB.
csv
'
)
HandleCSV
()
.
parse
(
'Tianyang_Inventory_Feed_RMB.
xlsx
'
)
end
=
time
.
time
()
print
(
"spend time: "
+
str
(
end
-
start
))
...
...
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