Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
5b32032c
Commit
5b32032c
authored
Jun 28, 2019
by
许俊鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对文件重的数据做一次过滤
parent
8d919e97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
tools.py
api/tools.py
+6
-0
No files found.
api/tools.py
View file @
5b32032c
...
...
@@ -110,6 +110,12 @@ class AddVirtFans(APIView):
fans_num_column
=
[
item
.
value
for
item
in
columns
[
1
]]
user_id_fans_num_data
=
list
(
zip
(
user_id_column
[
1
:],
fans_num_column
[
1
:]))
#做一次数据清洗。 避免文件中的空行
user_id_fans_num_data
=
[
(
user_id
,
fans_num
)
for
user_id
,
fans_num
in
user_id_fans_num_data
if
isinstance
(
user_id
,
int
)
and
isinstance
(
fans_num
,
int
)
]
try
:
self
.
rpc
[
'venus/sun/tools/add_virt_fans'
](
data
=
user_id_fans_num_data
)
.
unwrap
()
except
:
...
...
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