image_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')

toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet ', ascending=False)[:10]

topretweets = df.groupby('username')[['retweets']].sum()
topretweets.sort_values('retweets', ascending=False)[:10]

df2 = df
df2['date'] = df2['created_at'].map(lambda x: x.split(' ')[0])
df2['time'] = df2['created_at'].map(lambda x: x.split(' ')[-1])
del df2['created_at']
df2.head()