import pandas as pd

import sqlite3

con = sqlite3.connect('../input/database.sqlite')

post = pd.read_sql_query('SELECT * FROM post', con)
comment = pd.read_sql_query('SELECT * FROM comment', con)
like = pd.read_sql_query('SELECT * FROM like', con)
rmember = pd.read_sql_query('SELECT distinct id as rid, name  rname FROM member', con)
comment = pd.merge(comment, rmember, left_on='rid', right_on='rid', how='left')

comment.gid = comment.gid.map({'117291968282998': 'EPH', '25160801076': 'UCT', '1443890352589739': 'FSZ'})
comment['gid'].value_counts()

comment[(comment.gid == 'EPH') & (comment.rid == '')]['name'].value_counts().head(10)