Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
kpt
2024-07-03 19:59:38 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
4b1af050bae921f689276d7e8e3b5755b15737ff
4b1af050
2 parents
8eae8341
846c9219
Merge branch 'main' of
https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
spider/article.csv
spider/saveData.py
spider/article.csv
0 → 100644
View file @
4b1af05
id,likeNum,commentsLen,reposts_count,region,content,contentLen,created_at,type,detailUrl,authorAvatar,authorName,authorDetail,isVip
...
...
spider/saveData.py
View file @
4b1af05
...
...
@@ -7,9 +7,9 @@ engine = create_engine('mysql+pymysql://XiaoXueQi:XiaoXueQi@10.92.35.13/Weibo_Pu
def
save_to_sql
():
try
:
artileOldPd
=
pd
.
read_sql
(
'select * from article'
,
engine
)
articleNewPd
=
pd
.
read_csv
(
'article
Data
.csv'
)
articleNewPd
=
pd
.
read_csv
(
'article.csv'
)
commentOldPd
=
pd
.
read_sql
(
'select * from comments'
,
engine
)
commentNewPd
=
pd
.
read_csv
(
'
articleC
omments.csv'
)
commentNewPd
=
pd
.
read_csv
(
'
c
omments.csv'
)
concatArticlePd
=
pd
.
concat
([
articleNewPd
,
artileOldPd
],
join
=
'inner'
)
concatCommentsPd
=
pd
.
concat
([
commentNewPd
,
commentOldPd
],
join
=
'inner'
)
...
...
Please
register
or
login
to post a comment