Created
August 29, 2019 18:03
-
-
Save Lexie88rus/9ffe89bd2872856e0b33db90bcfec9d3 to your computer and use it in GitHub Desktop.
Create a list of popular kernel titles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Merge kernels and versions to retreive kernel title and total votes for kernel | |
kernels_trc = kernels[['CurrentKernelVersionId', 'TotalVotes']].rename(columns={'CurrentKernelVersionId' : 'Id'}) | |
kernel_version_trc = kernel_versions[['Id', 'Title']] | |
kernels_titles_votes = kernels_trc.merge(kernel_version_trc) | |
# Sort titles by the number of votes | |
kernels_titles_votes = kernels_titles_votes.sort_values(by=['TotalVotes']) | |
# Retreive the list of popular kernel titles (at leat 1 vote) | |
popular_kernel_titles = kernels_titles_votes[kernels_titles_votes['TotalVotes'] > 0]['Title'].unique().tolist() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment