Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
a2e85997
Commit
a2e85997
authored
Sep 06, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e9d11bae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dist_update_portrait_market.py
eda/smart_rank/dist_update_portrait_market.py
+2
-2
No files found.
eda/smart_rank/dist_update_portrait_market.py
View file @
a2e85997
...
...
@@ -191,12 +191,12 @@ def get_user_tag_score(cl_id, all_word_tags, size=10):
score_result
.
rename
(
columns
=
{
"cl_id"
:
"device_id"
},
inplace
=
True
)
# 写tidb
delete_sql
=
"delete from api_market_personas
2
where device_id='{}'"
.
format
(
cl_id
)
delete_sql
=
"delete from api_market_personas where device_id='{}'"
.
format
(
cl_id
)
cur_jerry_test
.
execute
(
delete_sql
)
db_jerry_test
.
commit
()
for
index
,
row
in
score_result
.
iterrows
():
insert_sql
=
"insert into api_market_personas
2
values (null, {}, '{}', {}, {}, {})"
.
format
(
insert_sql
=
"insert into api_market_personas values (null, {}, '{}', {}, {}, {})"
.
format
(
row
[
'tag_id'
],
row
[
'device_id'
],
row
[
'score'
],
row
[
'weight'
],
row
[
'pay_type'
])
cur_jerry_test
.
execute
(
insert_sql
)
db_jerry_test
.
commit
()
...
...
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