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
0
Merge Requests
0
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
钟尚武
sun
Commits
ee4d50fb
Commit
ee4d50fb
authored
Jun 28, 2019
by
许俊鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xujunpeng/feature/2_0_1' into 'test'
对文件重的数据做一次过滤 See merge request
alpha/sun!219
parents
00ec17d1
5b32032c
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 @
ee4d50fb
...
...
@@ -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