Page MenuHomePhabricator

raw-paste-data.txt

Authored By
Urbanecm_WMF
Jul 16 2021, 4:36 PM
Size
539 B
Referenced Files
None
Subscribers
None

raw-paste-data.txt

from wmfdata import mariadb
import pandas as pd
def get_dblist(dblist):
f = open('/srv/mediawiki-config/dblists/%s.dblist' % dblist)
res = f.read().split('\n')
f.close()
res.pop(0)
res.pop()
return res
dfs = []
wikis = get_dblist('growthexperiments')
for wiki in wikis:
df = mariadb.run('''
SELECT
DATABASE() AS dbname,
COUNT(*) AS mentees
FROM growthexperiments_mentor_mentee
''', wiki, use_x1=True)
df.set_index('dbname', inplace=True)
dfs.append(df)
df = pd.concat(dfs)

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9128782
Default Alt Text
raw-paste-data.txt (539 B)

Event Timeline