Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# picking columns that are more relevant
github_df = github_data_df[['topic','name','user','star','fork','watch','issue','pull_requests','topic_tag','commits','contributers']]
# pass a dictionary with old column names as key and new names as values to rename function
new_names = ['Topic','Repo_Name','User_Name','Star','Fork','Watch','Issues','Pull_Requests','Topic_Tags','Commits','Contributors']
old_names = github_df.columns
github_df = github_df.rename(columns=dict(zip(old_names, new_names)))
# a peek into the dataframe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment