import pandas as pd
from sqlalchemy import create_engine
titles = pd.read_csv('enwiki-20180701-all-titles.gz', sep="\t", header=None)
titles.count
<bound method DataFrame.count of                                                0
0                     page_namespace\tpage_title
1                                           0\t!
2                                          0\t!!
3                                         0\t!!!
4                              0\t!!!Fuck_You!!!
5                0\t!!!Fuck_You!!!_And_Then_Some
6                0\t!!!Fuck_You!!!_and_Then_Some
7                           0\t!!!_(Chk_Chk_Chk)
8                                 0\t!!!_(album)
9                                  0\t!!!_(band)
10                       0\t!!!_(disambiguation)
11                         0\t!!Destroy-Oh-Boy!!
12                               0\t!!Fuck_you!!
13                           0\t!!Going_Places!!
14                       0\t!!Que_Corra_La_Voz!!
15                                 0\t!!_(chess)
16                        0\t!!_(disambiguation)
17                                   0\t!'O!Kung
18                          0\t!'O!Kung_language
19                        0\t!'O-!khung_language
20                                  0\t!337$P34K
21                                         0\t!=
22                                         0\t!?
23                                        0\t!?!
24                             0\t!?Revolution!?
25                      0\t!?_(Interesting_move)
26                                 0\t!?_(chess)
27                                 0\t!A_Luchar!
28                              0\t!Action_Pact!
29                              0\t!Action_pact!
...                                          ...
45286708                      829\tWikipedia_ads
45286709                  829\tWikipedia_ads/doc
45286710                 829\tWikipedia_ads/list
45286711             829\tWikipedia_ads/list/doc
45286712              829\tWikipedia_ads/sandbox
45286713            829\tWikipedia_ads/testcases
45286714                  829\tWikitable/example
45286715                              829\tXpsoc
45286716                          829\tXpsoc/doc
45286717               829\tYMD_to_ISO/testcases
45286718                     829\tYear/testcases
45286719          829\tYear_in_various_calendars
45286720      829\tYear_in_various_calendars/doc
45286721  829\tYear_in_various_calendars/sandbox
45286722  829\tYemen_Insurgency_detailed_map/doc
45286723      829\tYemeni_Civil_War_detailed_map
45286724  829\tYemeni_Civil_War_detailed_map/doc
45286725                              829\tYesno
45286726                          829\tYesno/doc
45286727                    829\tYesno/testcases
45286728                        829\tYesno/tests
45286729                                 829\tZh
45286730                       829\tZh/Archive_1
45286731                       829\tZh/Archive_2
45286732                       829\tZh/Archive_3
45286733                       829\tZh/Archive_4
45286734                             829\tZh/doc
45286735                         829\tZh/sandbox
45286736    2300\tInvention,_Travel,_&_Adventure
45286737    2301\tInvention,_Travel,_&_Adventure

[45286738 rows x 1 columns]>
constr = 'mysql://enwiki-20180701-pagelinks.sql.gz'
con = create_engine(constr)
df = pd.read_sql('select * from plwiki_p.logging limit 10', con)