Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Unique hashtag counts
table = df_tags.pivot_table(index="Hashtags",values='Tweet_Id',aggfunc=len)
# Convert pivot table to dataframe
df_pivot = pd.DataFrame(table.to_records())
df_pivot.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment