Skip to content

Commit 30c8952

Browse files
committed
add csv
1 parent 62e0450 commit 30c8952

3 files changed

Lines changed: 26 additions & 7 deletions

File tree

juejin/anay.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import pandas as pd
22

3-
# 加载数据
4-
tag_df = pd.read_csv('D:/my/crawler_html2pdf/juejin/tag.csv')
3+
tags_df = pd.read_csv('D:/my/crawler_html2pdf/juejin/tag.csv')
54

6-
# 排序
7-
sorted_tags = tag_df.sort_values(by=['viewsCount'], ascending=False)
8-
languages = ['Android', 'iOS', 'Java', 'Python', 'Ruby', 'Swift', 'Go', 'Dart', 'Objective-C', 'C', 'C++', 'C#', 'PHP',
9-
'JavaScript', 'Perl', 'VB', 'R', 'MATLAB', 'Groovy', "Scala"]
5+
languages = ['Java', 'Python', 'Ruby', 'Swift', 'Go', 'Dart', 'Objective-C', 'C', 'C++', 'C#', 'PHP', 'JavaScript',
6+
'Perl', 'VB', 'R', 'MATLAB', 'Groovy', "Scala"]
107

11-
lang_tags = sorted_tags[sorted_tags["title"].isin(languages)]
8+
lang_tags_df = tags_df[tags_df["title"].isin(languages)]
129

1310
lang_tags = lang_tags[['title', 'viewsCount']]
1411
lang_tags.drop(177, axis=0, inplace=True)

juejin/js_tag.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
,collectionsCount,subscribersCount,entriesCount,viewsCount
2+
d3.js,688,6128,11,8974
3+
Meteor.js,848,4493,24,19344
4+
Ember.js,260,3455,10,11782
5+
Angular.js,15692,28530,230,318873
6+
Backbone.js,151,5821,5,3978
7+
React.js,47617,45185,726,915804
8+
Vue.js,68222,39886,730,1403066
9+
Underscore.js,399,4270,12,7084
10+
Sea.js,397,6461,7,6001

juejin/lang_tag.csv

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
,collectionsCount,subscribersCount,entriesCount,viewsCount
2+
Python,45234,45100,1007,930588
3+
C,2213,14870,50,52019
4+
PHP,15376,25143,375,329720
5+
C++,3495,18404,101,75019
6+
Go,5321,12881,179,145851
7+
Ruby,1543,6711,40,45162
8+
Java,103821,65303,1493,1590201
9+
Scala,282,3928,17,7468
10+
Swift,28498,30317,1180,928488
11+
Objective-C,12250,24198,337,282144
12+
JavaScript,222100,88872,2412,3548736

0 commit comments

Comments
 (0)