Skip to content

Instantly share code, notes, and snippets.

@amarsaikhanb
Last active March 30, 2020 01:08
Show Gist options
  • Save amarsaikhanb/0b0754f2183b4e0ef8d6eeb89dae762f to your computer and use it in GitHub Desktop.
Save amarsaikhanb/0b0754f2183b4e0ef8d6eeb89dae762f to your computer and use it in GitHub Desktop.
# Only blind audtion's videos
participants = participants[participants.title.str.contains('Blind Audition | The Voice of Mongolia S2', regex=False)]
# Drop same title
participants['title'] = participants.title.str.replace("| Blind Audition | The Voice of Mongolia S2", "", regex=False)
# Convert to numberical data
participants['publishedAt'].apply(lambda x: dateutil.parser.parse(x))
participants['categoryId'] = participants['categoryId'].astype(int)
participants['viewCount'] = participants['viewCount'].astype(int)
participants['commentCount'] = participants['commentCount'].astype(int)
participants['likeCount'] = participants['likeCount'].astype(int)
participants['dislikeCount'] = participants['dislikeCount'].astype(int)
participants['viewCount'] = participants['viewCount'].astype(int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment