如何根据前十名点击率排列这些数据?

2024-05-19 01:06:03 发布

您现在位置:Python中文网/ 问答频道 /正文

根据本周十大热门歌曲我该怎么安排

Billboard Hot 100 - Top 50 - Week of Dec 2, 2017                    
This Week   Last Week   Peak Position   Weeks on List   Title   Artist(s)
1   1   1   9   Rockstar    Post Malone Featuring 21 Savage
2   2   2   14  Havana  Camila Cabello Featuring Young Thug
3   12  3   10  Gucci Gang  Lil Pump
4   5   4   29  Thunder Imagine Dragons
5   3   1   20  Bodak Yellow (Money Moves)  Cardi B
6   4   4   10  Too Good At Goodbyes    Sam Smith
7   8   7   12  Perfect Ed Sheeran
8   6   3   29  1-800-273-8255  Logic Featuring Alessia Cara & Khalid
9   7   4   22  Feel It Still   Portugal, The Man
10  10  3   20  Mi Gente    J Balvin & Willy Wiliam Featuring Beyonce
11  9   9   12  What Lovers Do  Maroon 5 Featuring Featuring SZA
12  11  6   19  Sorry Not Sorry Demi Lovato
13  13  13  10  No Limit    G-Eazy Featuring A$AP Rocky & Cardi B
14  0   14  1   Walk On Water   Eninem Featuring Beyonce
15  23  14  3   Motorsport  Migos, Nicki Minaj & Cardi B
16  14  11  13  I Get The Bag   Gucci Mane Geaturing Migos
17  20  17  11  Bad At Love Halsey
18  30  4   11  ...Ready For It?    Taylor Swift
19  21  19  16  New Rules   Dua Lipa
20  17  13  15  What About Us   Pink
21  16  3   32  Unforgettable   French Montana Featuring Swae Lee
22  18  1   44  Despacito   Luis Fonsi & Daddy Yankee Featuring Justin Bieber
23  22  8   20  Rake It Up  Yo Gotti Featuring Nicki Minaj
24  19  5   30  Attention   Charlie Puth
25  29  25  8   I Fall Apart    Post Malone
26  24  4   41  Believer    Imagine Dragons
27  15  12  19  Bank Account    21 Savage
28  28  22  19  Praying Kesha
29  25  25  18  Young Dumb & Broke  Khalid
30  36  1   45  Shape of You    Ed Sheeran
31  37  1   13  Look What You Made Me Do    Taylor Swift
32  32  10  26  Strip That Down Liam Payne Featuring Quavo
33  33  6   30  There's Nothing Holdin' Me Back Shawn Mendes
34  36  1   44  That's What I Like  Bruno Mars
35  34  11  29  Slow Hands  Niall Horan
36  40  8   47  Congratulations Post Malone Featuring Quavo
37  31  31  12  The Way Life Goes   Lil Uzi Vert Featuring Nicki Minaj
38  43  38  16  The Weekend SZA
39  38  33  16  When It Rains It Pours  Luke Combs
40  44  40  6   How Long    Charlie Puth
41  0   18  21  Love    Kendrick Lamar Featuring Zacari
42  41  40  23  Do Re Mi    Blackbear
43  39  26  23  What Ifs    Kane Brown Featuring Lauren Alaina
44  54  42  14  Silence Marshmello Featuring Alaina
45  52  45  11  Greatest Love Story LANCO
46  47  46  10  Phil and Automobiles    Chris Brown Featuing Yo Gotti, A Boogie Wit da Hoodie & Kodak Black
47  46  1   33  Humble  Kendrick Lamar
48  45  7   34  XO TOUR Llif3   Lil Lizi Vert
49  42  3   39  Something Just Like This    The Chainsmokers & Coldplay
50  51  45  21  Crew    Goldlink Featuring Brent Faiyaz & Shy Glizzy

Tags: oftheitthispostdowhatweek
1条回答
网友
1楼 · 发布于 2024-05-19 01:06:03

编辑:数据不是这样解析的。但如果数据是单个字符串,我的答案仍然有效,我相信这很容易实现

如果您需要代码方面的帮助,请发布您迄今为止尝试过的代码

您需要识别要解析的文本中的模式。 例如,在这里,你可以注意到你的文本的第一行不是你想要的;但其他的都是你感兴趣的

你甚至可以看到,每一个顶端都是由一个连续的4位数字来“宣布”的,长度从1到2。也许在这个上面分开正则表达式可能会有所帮助

这几乎是你需要知道的一切

编辑2:我的答案也是有效的,她通过访问正确的索引将数据转换成长度为2([],[])的二维数组

相关问题 更多 >

    热门问题