Importing of different Modules

import gzip
import re
import json
import mwapi
import pandas as pd
import seaborn as sns
import matplotlib as plt
session = mwapi.Session(host='https://en.wikipedia.org',
                        user_agent='Miriiyala Pujitha Jaji')


parameters = {'action':'query',
              'format':'json',
              'list':'cxpublishedtranslations',
              'from':'en',
              'to':'es',
              'limit':500,
              'offset':200}
res = session.get(parameters)
res['result']['translations'][:5]
[{'translationId': '36063',
  'sourceTitle': 'Saki Nakajima (singer)',
  'targetTitle': 'Saki Nakajima (cantante)',
  'sourceLanguage': 'en',
  'sourceRevisionId': '0',
  'targetRevisionId': '0',
  'targetLanguage': 'es',
  'sourceURL': '//en.wikipedia.org/wiki/Saki Nakajima (singer)',
  'targetURL': '//es.wikipedia.org/wiki/Saki Nakajima (cantante)',
  'publishedDate': '20150417174007',
  'stats': {'any': 0.080306789984209,
   'human': 0.080306789984209,
   'mt': 0,
   'mtSectionsCount': 0}},
 {'translationId': '36066',
  'sourceTitle': 'Bad Hair',
  'targetTitle': 'Pelo Malo',
  'sourceLanguage': 'en',
  'sourceRevisionId': '0',
  'targetRevisionId': '0',
  'targetLanguage': 'es',
  'sourceURL': '//en.wikipedia.org/wiki/Bad Hair',
  'targetURL': '//es.wikipedia.org/wiki/Pelo Malo',
  'publishedDate': '20150417180504',
  'stats': {'any': 0.81668946648427,
   'human': 0.6046511627907,
   'mt': 0.21203830369357,
   'mtSectionsCount': 4}},
 {'translationId': '36077',
  'sourceTitle': 'The Color of Fame',
  'targetTitle': 'El tinte de la fama',
  'sourceLanguage': 'en',
  'sourceRevisionId': '0',
  'targetRevisionId': '0',
  'targetLanguage': 'es',
  'sourceURL': '//en.wikipedia.org/wiki/The Color of Fame',
  'targetURL': '//es.wikipedia.org/wiki/El tinte de la fama',
  'publishedDate': '20150417185854',
  'stats': {'any': 0.75752212389381,
   'human': 0.6858407079646,
   'mt': 0.071681415929204,
   'mtSectionsCount': 3}},
 {'translationId': '36111',
  'sourceTitle': 'XHJMA-TV',
  'targetTitle': 'XHJMA-TV',
  'sourceLanguage': 'en',
  'sourceRevisionId': '0',
  'targetRevisionId': '0',
  'targetLanguage': 'es',
  'sourceURL': '//en.wikipedia.org/wiki/XHJMA-TV',
  'targetURL': '//es.wikipedia.org/wiki/XHJMA-TV',
  'publishedDate': '20150418042642',
  'stats': {'any': 1.0625467231498,
   'human': 0.87864440568154,
   'mt': 0.18390231746823,
   'mtSectionsCount': 3}},
 {'translationId': '36138',
  'sourceTitle': 'Steelo Brim',
  'targetTitle': 'Steelo Brim',
  'sourceLanguage': 'en',
  'sourceRevisionId': '0',
  'targetRevisionId': '0',
  'targetLanguage': 'es',
  'sourceURL': '//en.wikipedia.org/wiki/Steelo Brim',
  'targetURL': '//es.wikipedia.org/wiki/Steelo Brim',
  'publishedDate': '20150418234617',
  'stats': {'any': 0.98945660989457,
   'human': 0.65531224655312,
   'mt': 0.33414436334144,
   'mtSectionsCount': 5}}]
Data = pd.DataFrame(res['result']['translations'])
df.head(10)
publishedDate sourceLanguage sourceRevisionId sourceTitle sourceURL stats targetLanguage targetRevisionId targetTitle targetURL translationId
0 20150501154707 en 0 RadioGatún //en.wikipedia.org/wiki/RadioGatún {'any': 0.90327287888263, 'human': 0.661663539... fr 0 RadioGatún //fr.wikipedia.org/wiki/RadioGatún 37407
1 20150501210643 en 0 James Arthur (mathematician) //en.wikipedia.org/wiki/James Arthur (mathemat... {'any': 1, 'human': 0, 'mt': 1, 'mtSectionsCou... fr 0 James Arthur (mathématicien) //fr.wikipedia.org/wiki/James Arthur (mathémat... 37446
2 20150502113009 en 0 United States House Committee on Armed Services //en.wikipedia.org/wiki/United States House Co... {'any': 0.085672082717873, 'human': 0.08567208... fr 0 Commission des forces armées de la Chambre des... //fr.wikipedia.org/wiki/Commission des forces ... 37507
3 20150502123249 en 0 Psiloceras //en.wikipedia.org/wiki/Psiloceras {'any': 0.60501721593704, 'human': 0.200688637... fr 0 Psiloceras //fr.wikipedia.org/wiki/Psiloceras 37511
4 20150502133010 en 0 Leopold Damrosch //en.wikipedia.org/wiki/Leopold Damrosch {'any': 0.90629892809828, 'human': 0.525352282... fr 0 Leopold Damrosch //fr.wikipedia.org/wiki/Leopold Damrosch 37514
5 20150502130647 en 0 Young Concert Artists //en.wikipedia.org/wiki/Young Concert Artists {'any': 1, 'human': 0.0087575259989053, 'mt': ... fr 0 "Young Concert Artist" //fr.wikipedia.org/wiki/"Young Concert Artist" 37516
6 20150502135219 en 0 A Handful of Dust //en.wikipedia.org/wiki/A Handful of Dust {'any': 0.2122880177926, 'human': 0.0322768974... fr 0 A Handful of Dust (roman) //fr.wikipedia.org/wiki/A Handful of Dust (roman) 37520
7 20150502134608 en 0 Israel Michael Sigal //en.wikipedia.org/wiki/Israel Michael Sigal {'any': 0.93074581430746, 'human': 0, 'mt': 0.... fr 0 Israel Michael Sigal //fr.wikipedia.org/wiki/Israel Michael Sigal 37524
8 20150502160803 en 0 Palmitoylation //en.wikipedia.org/wiki/Palmitoylation {'any': 1, 'human': 0.53858905875852, 'mt': 0.... fr 0 Palmitylation //fr.wikipedia.org/wiki/Palmitylation 37525
9 20150502170345 en 0 Ioana Pârvulescu //en.wikipedia.org/wiki/Ioana Pârvulescu {'any': 1, 'human': 0.98185117967332, 'mt': 0.... fr 0 Ioana Pârvulescu //fr.wikipedia.org/wiki/Ioana Pârvulescu 37547
df.describe
<bound method NDFrame.describe of       publishedDate sourceLanguage sourceRevisionId  \
0    20150501154707             en                0   
1    20150501210643             en                0   
2    20150502113009             en                0   
3    20150502123249             en                0   
4    20150502133010             en                0   
5    20150502130647             en                0   
6    20150502135219             en                0   
7    20150502134608             en                0   
8    20150502160803             en                0   
9    20150502170345             en                0   
10   20150502220046             en                0   
11   20150503091606             en                0   
12   20150503105015             en                0   
13   20150503151644             en                0   
14   20150503160824             en                0   
15   20150503172718             en                0   
16   20150503220234             en                0   
17   20150503231007             en                0   
18   20150504074304             en                0   
19   20150504081358             en                0   
20   20150504113718             en                0   
21   20150504152839             en                0   
22   20150504190822             en                0   
23   20150504193739             en                0   
24   20150504234914             en                0   
25   20150511045125             en                0   
26   20150514174629             en                0   
27   20150506023717             en                0   
28   20181115164652             en                0   
29   20150506170020             en                0   
..              ...            ...              ...   
470  20150626074204             en                0   
471  20150626074247             en                0   
472  20150626083806             en                0   
473  20150626083952             en                0   
474  20150626075040             en                0   
475  20150626090912             en                0   
476  20150626094850             en                0   
477  20150626085706             en                0   
478  20150626091044             en                0   
479  20150626092707             en                0   
480  20150626093327             en                0   
481  20150626091812             en                0   
482  20150626090630             en                0   
483  20150626091032             en                0   
484  20150626091201             en                0   
485  20150626091318             en                0   
486  20150626091602             en                0   
487  20150626091512             en                0   
488  20150626092005             en                0   
489  20150626092323             en                0   
490  20150626094254             en                0   
491  20150626092214             en                0   
492  20150701073952             en                0   
493  20150626092616             en                0   
494  20150626094712             en                0   
495  20150626095013             en                0   
496  20150626093513             en                0   
497  20150626103005             en                0   
498  20150626094108             en                0   
499  20150626104438             en                0   

                                           sourceTitle  \
0                                           RadioGatún   
1                         James Arthur (mathematician)   
2      United States House Committee on Armed Services   
3                                           Psiloceras   
4                                     Leopold Damrosch   
5                                Young Concert Artists   
6                                    A Handful of Dust   
7                                 Israel Michael Sigal   
8                                       Palmitoylation   
9                                     Ioana Pârvulescu   
10                                    John Friedlander   
11                         Taziki's Mediterranean Café   
12                                          Jiří Pauer   
13                   Frederick Henry Ambrose Scrivener   
14                                         Lise Tréhot   
15                                        Petra Nareks   
16                                         Zhao Shiyan   
17                                    Lykan HyperSport   
18                                     Spruce-pine-fir   
19                                            Softwood   
20                                   Juan José Arévalo   
21                                       Ichirō Satake   
22                                             Le Jerk   
23                              Beihai Fucheng Airport   
24                                            W Motors   
25                             Manuel Blanco Romasanta   
26                                       Atlas Vampire   
27                                            Paceband   
28                               Aluminium-ion battery   
29                                        Joel Feldman   
..                                                 ...   
470                                       Gale Sisters   
471                                       Ravish Kumar   
472               2015 SEC Men's Basketball Tournament   
473                                  Tributylphosphine   
474                                        Trần Thu Hà   
475                                  Food microbiology   
476     Imperial House of France (First French Empire)   
477                                        Pulau Hantu   
478  2012–13 CONCACAF Champions League championship...   
479  United States National Register of Historic Pl...   
480        Masonic Temple (Philadelphia, Pennsylvania)   
481                                         Bob Belden   
482                                      You're a Star   
483               Brendan O'Connor (media personality)   
484                                     Bill O'Herlihy   
485                                            Glenroe   
486                                         Wendlinger   
487                                          Fair City   
488                                    Alice Roosevelt   
489                                        Flying Home   
490                          Marlee Matlin filmography   
491                             The Clinic (TV series)   
492                                           Nokia E6   
493                                          Gary Ryan   
494                      German nationalism in Austria   
495                                  Amanda de Cadenet   
496                                  Mahala (Kalesija)   
497  Schleswig-Holstein-Sonderburg-Glücksburg (elde...   
498                                      TheStreet.com   
499                                Piano Sonata (Berg)   

                                             sourceURL  \
0                   //en.wikipedia.org/wiki/RadioGatún   
1    //en.wikipedia.org/wiki/James Arthur (mathemat...   
2    //en.wikipedia.org/wiki/United States House Co...   
3                   //en.wikipedia.org/wiki/Psiloceras   
4             //en.wikipedia.org/wiki/Leopold Damrosch   
5        //en.wikipedia.org/wiki/Young Concert Artists   
6            //en.wikipedia.org/wiki/A Handful of Dust   
7         //en.wikipedia.org/wiki/Israel Michael Sigal   
8               //en.wikipedia.org/wiki/Palmitoylation   
9             //en.wikipedia.org/wiki/Ioana Pârvulescu   
10            //en.wikipedia.org/wiki/John Friedlander   
11   //en.wikipedia.org/wiki/Taziki's Mediterranean...   
12                  //en.wikipedia.org/wiki/Jiří Pauer   
13   //en.wikipedia.org/wiki/Frederick Henry Ambros...   
14                 //en.wikipedia.org/wiki/Lise Tréhot   
15                //en.wikipedia.org/wiki/Petra Nareks   
16                 //en.wikipedia.org/wiki/Zhao Shiyan   
17            //en.wikipedia.org/wiki/Lykan HyperSport   
18             //en.wikipedia.org/wiki/Spruce-pine-fir   
19                    //en.wikipedia.org/wiki/Softwood   
20           //en.wikipedia.org/wiki/Juan José Arévalo   
21               //en.wikipedia.org/wiki/Ichirō Satake   
22                     //en.wikipedia.org/wiki/Le Jerk   
23      //en.wikipedia.org/wiki/Beihai Fucheng Airport   
24                    //en.wikipedia.org/wiki/W Motors   
25     //en.wikipedia.org/wiki/Manuel Blanco Romasanta   
26               //en.wikipedia.org/wiki/Atlas Vampire   
27                    //en.wikipedia.org/wiki/Paceband   
28       //en.wikipedia.org/wiki/Aluminium-ion battery   
29                //en.wikipedia.org/wiki/Joel Feldman   
..                                                 ...   
470               //en.wikipedia.org/wiki/Gale Sisters   
471               //en.wikipedia.org/wiki/Ravish Kumar   
472  //en.wikipedia.org/wiki/2015 SEC Men's Basketb...   
473          //en.wikipedia.org/wiki/Tributylphosphine   
474                //en.wikipedia.org/wiki/Trần Thu Hà   
475          //en.wikipedia.org/wiki/Food microbiology   
476  //en.wikipedia.org/wiki/Imperial House of Fran...   
477                //en.wikipedia.org/wiki/Pulau Hantu   
478  //en.wikipedia.org/wiki/2012–13 CONCACAF Champ...   
479  //en.wikipedia.org/wiki/United States National...   
480  //en.wikipedia.org/wiki/Masonic Temple (Philad...   
481                 //en.wikipedia.org/wiki/Bob Belden   
482              //en.wikipedia.org/wiki/You're a Star   
483  //en.wikipedia.org/wiki/Brendan O'Connor (medi...   
484             //en.wikipedia.org/wiki/Bill O'Herlihy   
485                    //en.wikipedia.org/wiki/Glenroe   
486                 //en.wikipedia.org/wiki/Wendlinger   
487                  //en.wikipedia.org/wiki/Fair City   
488            //en.wikipedia.org/wiki/Alice Roosevelt   
489                //en.wikipedia.org/wiki/Flying Home   
490  //en.wikipedia.org/wiki/Marlee Matlin filmography   
491     //en.wikipedia.org/wiki/The Clinic (TV series)   
492                   //en.wikipedia.org/wiki/Nokia E6   
493                  //en.wikipedia.org/wiki/Gary Ryan   
494  //en.wikipedia.org/wiki/German nationalism in ...   
495          //en.wikipedia.org/wiki/Amanda de Cadenet   
496          //en.wikipedia.org/wiki/Mahala (Kalesija)   
497  //en.wikipedia.org/wiki/Schleswig-Holstein-Son...   
498              //en.wikipedia.org/wiki/TheStreet.com   
499        //en.wikipedia.org/wiki/Piano Sonata (Berg)   

                                                 stats targetLanguage  \
0    {'any': 0.90327287888263, 'human': 0.661663539...             fr   
1    {'any': 1, 'human': 0, 'mt': 1, 'mtSectionsCou...             fr   
2    {'any': 0.085672082717873, 'human': 0.08567208...             fr   
3    {'any': 0.60501721593704, 'human': 0.200688637...             fr   
4    {'any': 0.90629892809828, 'human': 0.525352282...             fr   
5    {'any': 1, 'human': 0.0087575259989053, 'mt': ...             fr   
6    {'any': 0.2122880177926, 'human': 0.0322768974...             fr   
7    {'any': 0.93074581430746, 'human': 0, 'mt': 0....             fr   
8    {'any': 1, 'human': 0.53858905875852, 'mt': 0....             fr   
9    {'any': 1, 'human': 0.98185117967332, 'mt': 0....             fr   
10   {'any': 0.91574074074074, 'human': 0, 'mt': 0....             fr   
11   {'any': 0.91709361900326, 'human': 0.374941779...             fr   
12   {'any': 0.89197375063099, 'human': 0.866733972...             fr   
13   {'any': 0.13992537313433, 'human': 0.114972014...             fr   
14   {'any': 1, 'human': 0.71900581911431, 'mt': 0....             fr   
15   {'any': 0.81739130434783, 'human': 0.662608695...             fr   
16   {'any': 1, 'human': 0.64831804281346, 'mt': 0....             fr   
17   {'any': 0.91278135048232, 'human': 0.641881028...             fr   
18   {'any': 1, 'human': 1, 'mt': 0, 'mtSectionsCou...             fr   
19   {'any': 0.93656286043829, 'human': 0.936562860...             fr   
20   {'any': 0.081498071419684, 'human': 0, 'mt': 0...             fr   
21   {'any': 1, 'human': 0, 'mt': 1, 'mtSectionsCou...             fr   
22   {'any': 0.17269205939316, 'human': 0.172692059...             fr   
23   {'any': 0.74193548387097, 'human': 0.611612903...             fr   
24   {'any': 0.66593727206419, 'human': 0.495623632...             fr   
25   {'any': 1.0597183895847, 'human': 0.9907309134...             fr   
26   {'any': 1.0353618421053, 'human': 1.0353618421...             fr   
27   {'any': 0.93686671862822, 'human': 0.818394388...             fr   
28   {'any': 0.94639655790606, 'human': 0.659734671...             fr   
29   {'any': 0.99026903262736, 'human': 0, 'mt': 0....             fr   
..                                                 ...            ...   
470  {'any': 298.4119047619, 'human': 298.411904761...             fr   
471  {'any': 15079.777247414, 'human': 0, 'mt': 150...             fr   
472  {'any': 2020416722.2349, 'human': 20204.167189...             fr   
473  {'any': 7293206035655792, 'human': 7293206013....             fr   
474  {'any': 137698.36982408, 'human': 1.3769784877...             fr   
475  {'any': 1.0402280079021e+39, 'human': 1.040228...             fr   
476  {'any': 25.058371198882, 'human': 0, 'mt': 25....             fr   
477  {'any': 18231086806090176, 'human': 77445.0084...             fr   
478  {'any': 6.026879275729e+52, 'human': 6.0268792...             fr   
479  {'any': 6.3870287192745e+31, 'human': 63870287...             fr   
480  {'any': 1995318124850.8, 'human': 19953181.248...             fr   
481  {'any': 6.437428806195e+31, 'human': 6.4374288...             fr   
482  {'any': 0.002862458852154, 'human': 0.00286245...             fr   
483  {'any': 2158.4394658566, 'human': 0.0021517625...             fr   
484  {'any': 4214.2888818831, 'human': 0.0042034468...             fr   
485  {'any': 1248.9473372965, 'human': 0.0012449811...             fr   
486  {'any': 44.5, 'human': 44.5, 'mt': 0, 'mtSecti...             fr   
487  {'any': 58.647481013715, 'human': 5.5637466269...             fr   
488  {'any': 1373978.3136646, 'human': 1373978.3136...             fr   
489  {'any': 548.4061502756, 'human': 0.54830287206...             fr   
490  {'any': 316877647274.47, 'human': 32541511.588...             fr   
491  {'any': 0.00098101044075398, 'human': 0, 'mt':...             fr   
492  {'any': 1.5524307014764e+30, 'human': 9.223372...             fr   
493  {'any': 214.17647058824, 'human': 214.17647058...             fr   
494  {'any': 21539995.839111, 'human': 21.539991894...             fr   
495  {'any': 328976410301.49, 'human': 32953.205528...             fr   
496  {'any': 18810.455114823, 'human': 18.810020876...             fr   
497  {'any': 6375399527844441000, 'human': 63753995...             fr   
498  {'any': 9962825197.3309, 'human': 9962.8251872...             fr   
499  {'any': 9.2233720368548e+18, 'human': 9.223372...             fr   

    targetRevisionId                                        targetTitle  \
0                  0                                         RadioGatún   
1                  0                       James Arthur (mathématicien)   
2                  0  Commission des forces armées de la Chambre des...   
3                  0                                         Psiloceras   
4                  0                                   Leopold Damrosch   
5                  0                             "Young Concert Artist"   
6                  0                          A Handful of Dust (roman)   
7                  0                               Israel Michael Sigal   
8                  0                                      Palmitylation   
9                  0                                   Ioana Pârvulescu   
10                 0                                   John Friedlander   
11                 0                        Taziki's Mediterranean Café   
12                 0                                         Jiří Pauer   
13                 0                  Frederick Henry Ambrose Scrivener   
14                 0                                        Lise Tréhot   
15                 0                                       Petra Nareks   
16                 0                                                      
17                 0                 User:Brisingoldor/Lykan HyperSport   
18                 0                                    Spruce-pine-fir   
19                 0                                        Bois tendre   
20                 0                                  Juan José Arévalo   
21                 0                                      Ichirō Satake   
22                 0                                            Le Jerk   
23                 0                         Aéroport de Beihai Fucheng   
24                 0                                           W Motors   
25                 0                            Manuel Blanco Romasanta   
26                 0                                      Atlas Vampire   
27                 0                                Bracelet de cadence   
28                 0                         Accumulateur aluminium-ion   
29                 0                                       Joel Feldman   
..               ...                                                ...   
470                0                                         Sœurs Gale   
471                0                                       Ravish Kumar   
472                0               2015 SEC Men's Basketball Tournament   
473                0                                  Tributylphosphine   
474                0                                        Trần Thu Hà   
475                0                          Microbiologie alimentaire   
476                0     Imperial House of France (First French Empire)   
477                0                                        Pulau Hantu   
478                0  Phase finale de la ligue des champions de la C...   
479                0  Registre National Américain des Lieux Historiques   
480                0    Temple maçonnique de Philadelphie, Pennsylvanie   
481                0                                         Bob Belden   
482                0                                      You're a Star   
483                0                         Brendan O'Connor (irlande)   
484                0                                     Bill O'Herlihy   
485                0                                            Glenroe   
486                0                                         Wendlinger   
487                0                                          Fair City   
488                0                                    Alice Roosevelt   
489                0                       User:Franckecito/Flying Home   
490                0     User:Netpluriel/Filmographie de Marlee Matlin    
491                0                       The Clinic (série télévisée)   
492                0                                           Nokia E6   
493                0                                          Gary Ryan   
494                0                  Nationalisme allemand en Autriche   
495                0                                  Amanda de Cadenet   
496                0                                  Mahala (Kalesija)   
497                0  Schleswig-Holstein-Sonderbourg-Glücksbourg (br...   
498                0                                      TheStreet.com   
499                0                          Sonate pour piano de Berg   

                                             targetURL translationId  
0                   //fr.wikipedia.org/wiki/RadioGatún         37407  
1    //fr.wikipedia.org/wiki/James Arthur (mathémat...         37446  
2    //fr.wikipedia.org/wiki/Commission des forces ...         37507  
3                   //fr.wikipedia.org/wiki/Psiloceras         37511  
4             //fr.wikipedia.org/wiki/Leopold Damrosch         37514  
5       //fr.wikipedia.org/wiki/"Young Concert Artist"         37516  
6    //fr.wikipedia.org/wiki/A Handful of Dust (roman)         37520  
7         //fr.wikipedia.org/wiki/Israel Michael Sigal         37524  
8                //fr.wikipedia.org/wiki/Palmitylation         37525  
9             //fr.wikipedia.org/wiki/Ioana Pârvulescu         37547  
10            //fr.wikipedia.org/wiki/John Friedlander         37571  
11   //fr.wikipedia.org/wiki/Taziki's Mediterranean...         37583  
12                  //fr.wikipedia.org/wiki/Jiří Pauer         37592  
13   //fr.wikipedia.org/wiki/Frederick Henry Ambros...         37613  
14                 //fr.wikipedia.org/wiki/Lise Tréhot         37617  
15                //fr.wikipedia.org/wiki/Petra Nareks         37627  
16                 //fr.wikipedia.org/wiki/Zhao Shiyan         37651  
17   //fr.wikipedia.org/wiki/User:Brisingoldor/Lyka...         37654  
18             //fr.wikipedia.org/wiki/Spruce-pine-fir         37669  
19                 //fr.wikipedia.org/wiki/Bois tendre         37670  
20           //fr.wikipedia.org/wiki/Juan José Arévalo         37681  
21               //fr.wikipedia.org/wiki/Ichirō Satake         37694  
22                     //fr.wikipedia.org/wiki/Le Jerk         37715  
23   //fr.wikipedia.org/wiki/Aéroport de Beihai Fuc...         37719  
24                    //fr.wikipedia.org/wiki/W Motors         37738  
25     //fr.wikipedia.org/wiki/Manuel Blanco Romasanta         37749  
26               //fr.wikipedia.org/wiki/Atlas Vampire         37801  
27         //fr.wikipedia.org/wiki/Bracelet de cadence         37824  
28   //fr.wikipedia.org/wiki/Accumulateur aluminium...         37889  
29                //fr.wikipedia.org/wiki/Joel Feldman         37897  
..                                                 ...           ...  
470                 //fr.wikipedia.org/wiki/Sœurs Gale         46303  
471               //fr.wikipedia.org/wiki/Ravish Kumar         46304  
472  //fr.wikipedia.org/wiki/2015 SEC Men's Basketb...         46306  
473          //fr.wikipedia.org/wiki/Tributylphosphine         46307  
474                //fr.wikipedia.org/wiki/Trần Thu Hà         46308  
475  //fr.wikipedia.org/wiki/Microbiologie alimentaire         46312  
476  //fr.wikipedia.org/wiki/Maison Impériale de Fr...         46327  
477                //fr.wikipedia.org/wiki/Pulau Hantu         46340  
478  //fr.wikipedia.org/wiki/Phase finale de la lig...         46356  
479  //fr.wikipedia.org/wiki/Registre National Amér...         46363  
480  //fr.wikipedia.org/wiki/Temple maçonnique de P...         46366  
481                 //fr.wikipedia.org/wiki/Bob Belden         46368  
482              //fr.wikipedia.org/wiki/You're a Star         46369  
483  //fr.wikipedia.org/wiki/Brendan O'Connor (irla...         46371  
484             //fr.wikipedia.org/wiki/Bill O'Herlihy         46374  
485                    //fr.wikipedia.org/wiki/Glenroe         46375  
486                 //fr.wikipedia.org/wiki/Wendlinger         46377  
487                  //fr.wikipedia.org/wiki/Fair City         46379  
488            //fr.wikipedia.org/wiki/Alice Roosevelt         46380  
489  //fr.wikipedia.org/wiki/User:Franckecito/Flyin...         46383  
490  //fr.wikipedia.org/wiki/User:Netpluriel/Filmog...         46387  
491  //fr.wikipedia.org/wiki/The Clinic (série télé...         46388  
492                   //fr.wikipedia.org/wiki/Nokia E6         46390  
493                  //fr.wikipedia.org/wiki/Gary Ryan         46391  
494  //fr.wikipedia.org/wiki/Nationalisme allemand ...         46392  
495          //fr.wikipedia.org/wiki/Amanda de Cadenet         46396  
496          //fr.wikipedia.org/wiki/Mahala (Kalesija)         46397  
497  //fr.wikipedia.org/wiki/Schleswig-Holstein-Son...         46399  
498              //fr.wikipedia.org/wiki/TheStreet.com         46400  
499  //fr.wikipedia.org/wiki/Sonate pour piano de Berg         46403  

[500 rows x 11 columns]>
Data.describe
<bound method NDFrame.describe of       publishedDate sourceLanguage sourceRevisionId  \
0    20150417174007             en                0   
1    20150417180504             en                0   
2    20150417185854             en                0   
3    20150418042642             en                0   
4    20150418234617             en                0   
5    20150418164417             en                0   
6    20150418174259             en                0   
7    20150418193258             en                0   
8    20150418213840             en                0   
9    20150418215144             en                0   
10   20150418215331             en                0   
11   20150418223327             en                0   
12   20150418230336             en                0   
13   20150418230520             en                0   
14   20150419005816             en                0   
15   20151219025401             en        694728298   
16   20150919091711             en                0   
17   20150419035102             en                0   
18   20150419060620             en                0   
19   20150419165109             en                0   
20   20150421152921             en                0   
21   20150419195152             en                0   
22   20150419220515             en                0   
23   20150419233345             en                0   
24   20150420001410             en                0   
25   20150420061317             en                0   
26   20150420073014             en                0   
27   20150420121228             en                0   
28   20150510214545             en                0   
29   20150420164939             en                0   
..              ...            ...              ...   
470  20150609202234             en                0   
471  20150609223535             en                0   
472  20150609231432             en                0   
473  20150609234236             en                0   
474  20150610075117             en                0   
475  20150610084402             en                0   
476  20150610140246             en                0   
477  20150610143600             en                0   
478  20150610145516             en                0   
479  20150610171227             en                0   
480  20150610195159             en                0   
481  20150610213307             en                0   
482  20150611123606             en                0   
483  20150611050430             en                0   
484  20150611171314             en                0   
485  20150704043902             en                0   
486  20150611115536             en                0   
487  20150611134558             en                0   
488  20150611165342             en                0   
489  20150611193809             en                0   
490  20150611191353             en                0   
491  20150611200434             en                0   
492  20150611221748             en                0   
493  20150611225230             en                0   
494  20150612032034             en                0   
495  20150620044143             en                0   
496  20150612065519             en                0   
497  20150612073730             en                0   
498  20150612171038             en                0   
499  20150612181218             en                0   

                                           sourceTitle  \
0                               Saki Nakajima (singer)   
1                                             Bad Hair   
2                                    The Color of Fame   
3                                             XHJMA-TV   
4                                          Steelo Brim   
5                                    Rómulo Pico Adobe   
6                                     Hedwig of Kalisz   
7                                          Citadel LLC   
8                          Luis María Pérez de Onraíta   
9                               Stephan G. Stephansson   
10                                    Pyronia bathseba   
11                                           SFB Games   
12                                        The Cataracs   
13                                            Ketchapp   
14                                         NVM Express   
15                                 HMS Plymouth (F126)   
16                                        César Civita   
17                                     Werthein family   
18                                       Yang Hyun-suk   
19                                        Bean machine   
20                                    Richard Pakenham   
21                                     The Brazen Head   
22             She's So Unusual: 30th Anniversary Tour   
23                                   False equivalence   
24   List of Bailando por un Sueño (Argentina) comp...   
25                                      Anthony Levine   
26                                       Electro-Voice   
27                              Cleomenes of Naucratis   
28            2015 Grand Prix motorcycle racing season   
29                                          Skyscanner   
..                                                 ...   
470                                  Émile-René Ménard   
471                                 Hippolyte Bellangé   
472                           The Non-Violence Project   
473                                    Tom Yum Goong 2   
474                                     Vienna Diptych   
475                                 Trinity Altarpiece   
476           Alternatives to the Standard Model Higgs   
477                             Argument from illusion   
478                                    Antonio Mancini   
479                                         Mel's Hole   
480                                       János Kornai   
481                                Trespass Against Us   
482                                    Filippo Carcano   
483                    The Light Between Oceans (film)   
484                                          Bancomext   
485                                Chilango (magazine)   
486                                     Jimmy Garrison   
487                                  Léon-Victor Dupré   
488                                      Eco-investing   
489                                    Winter vacation   
490                                          Canaryfly   
491  Fiscal Observatory of Latin America and the Ca...   
492                                      Weyl integral   
493                       Christian Stephen of Ecuador   
494                                 Duomitus ceramicus   
495                     South American Mission Society   
496                          The Crucifixion (Cranach)   
497  Portraits of Henry IV of Saxony and Catherine ...   
498                       Reverse domain name notation   
499                             Northern South America   

                                             sourceURL  \
0       //en.wikipedia.org/wiki/Saki Nakajima (singer)   
1                     //en.wikipedia.org/wiki/Bad Hair   
2            //en.wikipedia.org/wiki/The Color of Fame   
3                     //en.wikipedia.org/wiki/XHJMA-TV   
4                  //en.wikipedia.org/wiki/Steelo Brim   
5            //en.wikipedia.org/wiki/Rómulo Pico Adobe   
6             //en.wikipedia.org/wiki/Hedwig of Kalisz   
7                  //en.wikipedia.org/wiki/Citadel LLC   
8    //en.wikipedia.org/wiki/Luis María Pérez de On...   
9       //en.wikipedia.org/wiki/Stephan G. Stephansson   
10            //en.wikipedia.org/wiki/Pyronia bathseba   
11                   //en.wikipedia.org/wiki/SFB Games   
12                //en.wikipedia.org/wiki/The Cataracs   
13                    //en.wikipedia.org/wiki/Ketchapp   
14                 //en.wikipedia.org/wiki/NVM Express   
15         //en.wikipedia.org/wiki/HMS Plymouth (F126)   
16                //en.wikipedia.org/wiki/César Civita   
17             //en.wikipedia.org/wiki/Werthein family   
18               //en.wikipedia.org/wiki/Yang Hyun-suk   
19                //en.wikipedia.org/wiki/Bean machine   
20            //en.wikipedia.org/wiki/Richard Pakenham   
21             //en.wikipedia.org/wiki/The Brazen Head   
22   //en.wikipedia.org/wiki/She's So Unusual: 30th...   
23           //en.wikipedia.org/wiki/False equivalence   
24   //en.wikipedia.org/wiki/List of Bailando por u...   
25              //en.wikipedia.org/wiki/Anthony Levine   
26               //en.wikipedia.org/wiki/Electro-Voice   
27      //en.wikipedia.org/wiki/Cleomenes of Naucratis   
28   //en.wikipedia.org/wiki/2015 Grand Prix motorc...   
29                  //en.wikipedia.org/wiki/Skyscanner   
..                                                 ...   
470          //en.wikipedia.org/wiki/Émile-René Ménard   
471         //en.wikipedia.org/wiki/Hippolyte Bellangé   
472   //en.wikipedia.org/wiki/The Non-Violence Project   
473            //en.wikipedia.org/wiki/Tom Yum Goong 2   
474             //en.wikipedia.org/wiki/Vienna Diptych   
475         //en.wikipedia.org/wiki/Trinity Altarpiece   
476  //en.wikipedia.org/wiki/Alternatives to the St...   
477     //en.wikipedia.org/wiki/Argument from illusion   
478            //en.wikipedia.org/wiki/Antonio Mancini   
479                 //en.wikipedia.org/wiki/Mel's Hole   
480               //en.wikipedia.org/wiki/János Kornai   
481        //en.wikipedia.org/wiki/Trespass Against Us   
482            //en.wikipedia.org/wiki/Filippo Carcano   
483  //en.wikipedia.org/wiki/The Light Between Ocea...   
484                  //en.wikipedia.org/wiki/Bancomext   
485        //en.wikipedia.org/wiki/Chilango (magazine)   
486             //en.wikipedia.org/wiki/Jimmy Garrison   
487          //en.wikipedia.org/wiki/Léon-Victor Dupré   
488              //en.wikipedia.org/wiki/Eco-investing   
489            //en.wikipedia.org/wiki/Winter vacation   
490                  //en.wikipedia.org/wiki/Canaryfly   
491  //en.wikipedia.org/wiki/Fiscal Observatory of ...   
492              //en.wikipedia.org/wiki/Weyl integral   
493  //en.wikipedia.org/wiki/Christian Stephen of E...   
494         //en.wikipedia.org/wiki/Duomitus ceramicus   
495  //en.wikipedia.org/wiki/South American Mission...   
496  //en.wikipedia.org/wiki/The Crucifixion (Cranach)   
497  //en.wikipedia.org/wiki/Portraits of Henry IV ...   
498  //en.wikipedia.org/wiki/Reverse domain name no...   
499     //en.wikipedia.org/wiki/Northern South America   

                                                 stats targetLanguage  \
0    {'any': 0.080306789984209, 'human': 0.08030678...             es   
1    {'any': 0.81668946648427, 'human': 0.604651162...             es   
2    {'any': 0.75752212389381, 'human': 0.685840707...             es   
3    {'any': 1.0625467231498, 'human': 0.8786444056...             es   
4    {'any': 0.98945660989457, 'human': 0.655312246...             es   
5    {'any': 1.0345241669168, 'human': 0.8682077454...             es   
6    {'any': 1.027838033261, 'human': 0.95263919016...             es   
7    {'any': 0.41940928270042, 'human': 0, 'mt': 0....             es   
8    {'any': 1.0336448598131, 'human': 0.5327102803...             es   
9    {'any': 0.72252747252747, 'human': 0.714972527...             es   
10   {'any': 1.0731292517007, 'human': 0.8826530612...             es   
11   {'any': 1.0583241048357, 'human': 0.3768918420...             es   
12   {'any': 1.0637146371464, 'human': 0.5396678966...             es   
13   {'any': 1.1327849588719, 'human': 1.1151586368...             es   
14   {'any': 0.04510761190951, 'human': 0.045107611...             es   
15   {'any': 0.053544229642648, 'human': 0, 'mt': 0...             es   
16   {'any': 0, 'human': 0, 'mt': 0, 'mtSectionsCou...             es   
17   {'any': 0.6584676944804, 'human': 0.5978580675...             es   
18   {'any': 1.0060532687651, 'human': 0.8301049233...             es   
19   {'any': 0.65085536547434, 'human': 0.576982892...             es   
20   {'any': 1.0135472370766, 'human': 1.0096256684...             es   
21   {'any': 1.0210667861945, 'human': 0.4087852980...             es   
22   {'any': 1.047947454844, 'human': 0.64542966611...             es   
23   {'any': 1.0896458987001, 'human': 0.8771851187...             es   
24   {'any': 1.0083729895789, 'human': 0.9791578820...             es   
25   {'any': 0.92301392301392, 'human': 0.665847665...             es   
26   {'any': 1.0617397291714, 'human': 0.8276336929...             es   
27   {'any': 1.0386343216532, 'human': 0.9203354297...             es   
28   {'any': 1.0213259418486, 'human': 0.6239959271...             es   
29   {'any': 1.0762363610599, 'human': 0.3553918095...             es   
..                                                 ...            ...   
470  {'any': 0.15460335842501, 'human': 0.154603358...             es   
471  {'any': 0.95547594677584, 'human': 0.315250767...             es   
472  {'any': 0.22308418073173, 'human': 0.119509382...             es   
473  {'any': 0.43428768540876, 'human': 0.331608600...             es   
474  {'any': 1.0647719762062, 'human': 0.7633840052...             es   
475  {'any': 1.078431372549, 'human': 0.68627450980...             es   
476  {'any': 0.037527114967462, 'human': 0.03752711...             es   
477  {'any': 0.51800720288115, 'human': 0.440576230...             es   
478  {'any': 0.27640583159774, 'human': 0.268967569...             es   
479  {'any': 1.1364902506964, 'human': 0.9547353760...             es   
480  {'any': 1.0208053691275, 'human': 0.9375838926...             es   
481  {'any': 1.0454299621417, 'human': 0.5673336938...             es   
482  {'any': 0.77926015767132, 'human': 0.773802304...             es   
483  {'any': 1.0780716723549, 'human': 0.6668088737...             es   
484  {'any': 0.84738527214514, 'human': 0.815368196...             es   
485  {'any': 0.66617063492063, 'human': 0.618551587...             es   
486  {'any': 1.0155933576347, 'human': 0.5923450789...             es   
487  {'any': 0.31075110456554, 'human': 0.294550810...             es   
488  {'any': 1.0883957118676, 'human': 0.7797630242...             es   
489  {'any': 1.0156695156695, 'human': 0.9415954415...             es   
490  {'any': 0.92871157619359, 'human': 0.736429038...             es   
491  {'any': 0.82338902147971, 'human': 0, 'mt': 0....             es   
492  {'any': 1.1445086705202, 'human': 0.6566473988...             es   
493  {'any': 1.0285097682871, 'human': 0.6700363471...             es   
494  {'any': 0.76888888888889, 'human': 0.353333333...             es   
495  {'any': 1.045782408335, 'human': 0.84822680825...             es   
496  {'any': 1.0460704607046, 'human': 0.9604336043...             es   
497  {'any': 0.92882147024504, 'human': 0.827304550...             es   
498  {'any': 1.0192697768763, 'human': 0.6054766734...             es   
499  {'any': 1.0567375886525, 'human': 0.4627659574...             es   

    targetRevisionId                                        targetTitle  \
0                  0                           Saki Nakajima (cantante)   
1                  0                                          Pelo Malo   
2                  0                                El tinte de la fama   
3                  0                                           XHJMA-TV   
4                  0                                        Steelo Brim   
5                  0                                  Rómulo Pico Adobe   
6                  0                                 Eduviges de Kalisz   
7                  0                                        Citadel LLC   
8                  0                        Luis María Pérez de Onraíta   
9                  0                             Stephan G. Stephansson   
10                 0                                   Pyronia bathseba   
11                 0                                          SFB Games   
12                 0                                       The Cataracs   
13                 0                                           Ketchapp   
14                 0                                        NVM Express   
15          87885336                                HMS Plymouth (F126)   
16                 0                                       César Civita   
17                 0                                   Familia Werthein   
18                 0                                      Yang Hyun Suk   
19                 0                                  Máquina de Galton   
20                 0                                   Richard Pakenham   
21                 0                                    The Brazen Head   
22                 0            She's So Unusual: 30th Anniversary Tour   
23                 0                                 Falsa equivalencia   
24                 0  Anexo:Lista de participantes de Bailando por u...   
25                 0                                     Anthony Levine   
26                 0                                      Electro-Voice   
27                 0                             Cleómenes de Naucratis   
28                 0  Temporada 2015 del campeonato del mundo de mot...   
29                 0                                         Skyscanner   
..               ...                                                ...   
470                0                                  Émile-René Ménard   
471                0                                 Hippolyte Bellangé   
472                0                      El proyecto a la NO-Violencia   
473                0                                    Tom yum goong 2   
474                0                                   Díptico de Viena   
475                0                               Altar de la Trinidad   
476                0  Alternativas al modelo estándar de física de p...   
477                0                               Argumento de ilusión   
478                0                                    Antonio Mancini   
479                0                                  El agujero de Mel   
480                0                                       János Kornai   
481                0                                Trespass Against Us   
482                0                                    Filippo Carcano   
483                0                           The Light Between Oceans   
484                0       Banco Nacional de Comercio Exterior (México)   
485                0                                 Chilango (revista)   
486                0                                     Jimmy Garrison   
487                0                                  Léon-Victor Dupré   
488                0                                      Eco-inversión   
489                0                             Vacaciones de invierno   
490                0                                          Canaryfly   
491                0  Observatorio Fiscal de América Latina y el Car...   
492                0                                   Integral de Weyl   
493                0                                 Christian Stephen'   
494                0                                 Duomitus ceramicus   
495                0              Sociedad Misionera de América del Sur   
496                0                           La crucifixión (Cranach)   
497                0  Retrato de Enrique IV de Sajonia y Catalina de...   
498                0              Notación de nombre de dominio inverso   
499                0                               Sudamérica del Norte   

                                             targetURL translationId  
0     //es.wikipedia.org/wiki/Saki Nakajima (cantante)         36063  
1                    //es.wikipedia.org/wiki/Pelo Malo         36066  
2          //es.wikipedia.org/wiki/El tinte de la fama         36077  
3                     //es.wikipedia.org/wiki/XHJMA-TV         36111  
4                  //es.wikipedia.org/wiki/Steelo Brim         36138  
5            //es.wikipedia.org/wiki/Rómulo Pico Adobe         36143  
6           //es.wikipedia.org/wiki/Eduviges de Kalisz         36151  
7                  //es.wikipedia.org/wiki/Citadel LLC         36161  
8    //es.wikipedia.org/wiki/Luis María Pérez de On...         36172  
9       //es.wikipedia.org/wiki/Stephan G. Stephansson         36173  
10            //es.wikipedia.org/wiki/Pyronia bathseba         36178  
11                   //es.wikipedia.org/wiki/SFB Games         36181  
12                //es.wikipedia.org/wiki/The Cataracs         36182  
13                    //es.wikipedia.org/wiki/Ketchapp         36183  
14                 //es.wikipedia.org/wiki/NVM Express         36187  
15         //es.wikipedia.org/wiki/HMS Plymouth (F126)         36192  
16                //es.wikipedia.org/wiki/César Civita         36193  
17            //es.wikipedia.org/wiki/Familia Werthein         36194  
18               //es.wikipedia.org/wiki/Yang Hyun Suk         36196  
19           //es.wikipedia.org/wiki/Máquina de Galton         36234  
20            //es.wikipedia.org/wiki/Richard Pakenham         36239  
21             //es.wikipedia.org/wiki/The Brazen Head         36258  
22   //es.wikipedia.org/wiki/She's So Unusual: 30th...         36268  
23          //es.wikipedia.org/wiki/Falsa equivalencia         36286  
24   //es.wikipedia.org/wiki/Anexo:Lista de partici...         36288  
25              //es.wikipedia.org/wiki/Anthony Levine         36296  
26               //es.wikipedia.org/wiki/Electro-Voice         36307  
27      //es.wikipedia.org/wiki/Cleómenes de Naucratis         36312  
28   //es.wikipedia.org/wiki/Temporada 2015 del cam...         36338  
29                  //es.wikipedia.org/wiki/Skyscanner         36343  
..                                                 ...           ...  
470          //es.wikipedia.org/wiki/Émile-René Ménard         42701  
471         //es.wikipedia.org/wiki/Hippolyte Bellangé         42731  
472  //es.wikipedia.org/wiki/El proyecto a la NO-Vi...         42734  
473            //es.wikipedia.org/wiki/Tom yum goong 2         42741  
474           //es.wikipedia.org/wiki/Díptico de Viena         42768  
475       //es.wikipedia.org/wiki/Altar de la Trinidad         42774  
476  //es.wikipedia.org/wiki/Alternativas al modelo...         42806  
477       //es.wikipedia.org/wiki/Argumento de ilusión         42810  
478            //es.wikipedia.org/wiki/Antonio Mancini         42819  
479          //es.wikipedia.org/wiki/El agujero de Mel         42829  
480               //es.wikipedia.org/wiki/János Kornai         42848  
481        //es.wikipedia.org/wiki/Trespass Against Us         42881  
482            //es.wikipedia.org/wiki/Filippo Carcano         42887  
483   //es.wikipedia.org/wiki/The Light Between Oceans         42909  
484  //es.wikipedia.org/wiki/Banco Nacional de Come...         42915  
485         //es.wikipedia.org/wiki/Chilango (revista)         42917  
486             //es.wikipedia.org/wiki/Jimmy Garrison         42963  
487          //es.wikipedia.org/wiki/Léon-Victor Dupré         42986  
488              //es.wikipedia.org/wiki/Eco-inversión         43023  
489     //es.wikipedia.org/wiki/Vacaciones de invierno         43025  
490                  //es.wikipedia.org/wiki/Canaryfly         43050  
491  //es.wikipedia.org/wiki/Observatorio Fiscal de...         43058  
492           //es.wikipedia.org/wiki/Integral de Weyl         43075  
493         //es.wikipedia.org/wiki/Christian Stephen'         43079  
494         //es.wikipedia.org/wiki/Duomitus ceramicus         43093  
495  //es.wikipedia.org/wiki/Sociedad Misionera de ...         43102  
496   //es.wikipedia.org/wiki/La crucifixión (Cranach)         43107  
497  //es.wikipedia.org/wiki/Retrato de Enrique IV ...         43114  
498  //es.wikipedia.org/wiki/Notación de nombre de ...         43199  
499       //es.wikipedia.org/wiki/Sudamérica del Norte         43217  

[500 rows x 11 columns]>
Data.columns
Index(['publishedDate', 'sourceLanguage', 'sourceRevisionId', 'sourceTitle',
       'sourceURL', 'stats', 'targetLanguage', 'targetRevisionId',
       'targetTitle', 'targetURL', 'translationId'],
      dtype='object')
Data.index
RangeIndex(start=0, stop=500, step=1)
Data.shape
(500, 11)
Data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 500 entries, 0 to 499
Data columns (total 11 columns):
publishedDate       500 non-null object
sourceLanguage      500 non-null object
sourceRevisionId    500 non-null object
sourceTitle         500 non-null object
sourceURL           500 non-null object
stats               500 non-null object
targetLanguage      500 non-null object
targetRevisionId    500 non-null object
targetTitle         500 non-null object
targetURL           500 non-null object
translationId       500 non-null object
dtypes: object(11)
memory usage: 43.0+ KB
Data['sourceURL'].nunique()
500

There are 11 Columns

print(Data['publishedDate'].describe())
count                500
unique               500
top       20150426184145
freq                   1
Name: publishedDate, dtype: object
print(Data['sourceLanguage'].describe())
count     500
unique      1
top        en
freq      500
Name: sourceLanguage, dtype: object
print(Data['sourceRevisionId'].describe())
count     500
unique      6
top         0
freq      495
Name: sourceRevisionId, dtype: object
print(Data['sourceTitle'].describe())
count                              500
unique                             500
top       Christian Stephen of Ecuador
freq                                 1
Name: sourceTitle, dtype: object
print(Data['translationId'].describe())
count       500
unique      500
top       38510
freq          1
Name: translationId, dtype: object
print(Data['targetTitle'].describe())
count              500
unique             500
top       Howy Parkins
freq                 1
Name: targetTitle, dtype: object
print(Data['targetLanguage'].describe())
print(Data['sourceLanguage'].describe())
count     500
unique      1
top        es
freq      500
Name: targetLanguage, dtype: object
count     500
unique      1
top        en
freq      500
Name: sourceLanguage, dtype: object
Data[Data['sourceTitle'] == 'Gradient boosting']
publishedDate sourceLanguage sourceRevisionId sourceTitle sourceURL stats targetLanguage targetRevisionId targetTitle targetURL translationId
gboost_source_title = Data.loc[10, 'sourceTitle']
gboost_target_title = Data.loc[10, 'targetTitle']
gboost_tid = Data.loc[8,'translationId']
gboost_source_revid = Data.loc[10, 'sourceRevisionId']
print(gboost_source_title)
print(gboost_target_title)
print(gboost_tid)
print(gboost_source_revid)
Pyronia bathseba
Pyronia bathseba
36172
0
gboost_stats = Data.loc[10, 'stats']
json_str = ""
with gzip.open('cx-corpora._2_.text.json.gz', 'rt') as fin:
    for line in fin:
        json_str += line.strip()
# remove repetitive commas
json_str = re.sub(',{2,}', ',', json_str)
parallel_corpus = json.loads(json_str)
# if this still throws an error, it's probably a trailing comma
# find where that comma is and instead do something like:
# parallel_corpus = json.loads(json_str[:<comma-idx>] + json_str[<comma-idx>+1:])
# id: a string composed of <translationID>/<sectionID>
# <translationID> is in the data accessed from the first API
# each section in the article that was translated gets its own <sectionID>
# mt indicates whether machine translation was used in the interface
print("Descriptive statistics:")
print("{0} translated sections.".format(len(parallel_corpus)))
print("{0} translated articles.".format(len(set(sec['id'].split('/')[0] for sec in parallel_corpus))))
mt_counts = {}
for sec in parallel_corpus:
    if sec['mt']:
        service = sec['mt']['engine']
        mt_counts[service] = mt_counts.get(service, 0) + 1
    else:
        mt_counts['no-mt'] = mt_counts.get('no-mt', 0) + 1
print("Machine translation services used: {0}".format(mt_counts))
print("\nExample:\n", parallel_corpus[0])
Descriptive statistics:
183464 translated sections.
19022 translated articles.
Machine translation services used: {'no-mt': 141130, 'Apertium': 3638, 'Yandex': 38652, 'scratch': 43, 'source-mt': 1}

Example:
 {'id': '180587/mwAQ', 'sourceLanguage': 'af', 'targetLanguage': 'haw', 'source': {'content': "Minas Gerais é o Meu País\xa0(Minas Gerais, Is my land in afrikaans) is'n separatisme beweging veg vir die onafhanklikheid van Minas Gerais te skei van die res van Brasilië."}, 'mt': None, 'target': {'content': 'Minas Gerais é o Meu País\xa0(nan Minas Gerais se peyi mwen nan hawai`i) is`n mouvman separatism goumen pou separe endepandans la nan Minas Gerais de rès la nan Brezil.\xa0'}}
from mwviews.api import PageviewsClient

p = PageviewsClient(user_agent="Miriiyala Pujitha Jaji Outreachy Aspirant")

p.article_views('en.wikipedia', ['Selfie', 'Cat', 'Dog'])
p.project_views(['ro.wikipedia', 'de.wikipedia', 'commons.wikimedia'])
p.top_articles('en.wikipedia', limit=10)
p.article_views('en.wikipedia', ['Selfie', 'Cat'])
defaultdict(dict,
            {datetime.datetime(2019, 3, 1, 0, 0): {'Selfie': 724, 'Cat': 6810},
             datetime.datetime(2019, 3, 2, 0, 0): {'Selfie': 704, 'Cat': 6809},
             datetime.datetime(2019, 3, 3, 0, 0): {'Selfie': 661, 'Cat': 6894},
             datetime.datetime(2019, 3, 4, 0, 0): {'Selfie': 1324,
              'Cat': 7278},
             datetime.datetime(2019, 3, 5, 0, 0): {'Selfie': 811, 'Cat': 7421},
             datetime.datetime(2019, 3, 6, 0, 0): {'Selfie': 748, 'Cat': 7587},
             datetime.datetime(2019, 3, 7, 0, 0): {'Selfie': 886, 'Cat': 7409},
             datetime.datetime(2019, 3, 8, 0, 0): {'Selfie': 722, 'Cat': 6741},
             datetime.datetime(2019, 3, 9, 0, 0): {'Selfie': 1056,
              'Cat': 6132},
             datetime.datetime(2019, 3, 10, 0, 0): {'Selfie': 842,
              'Cat': 6850},
             datetime.datetime(2019, 3, 11, 0, 0): {'Selfie': 928,
              'Cat': 7513},
             datetime.datetime(2019, 3, 12, 0, 0): {'Selfie': 935,
              'Cat': 7260},
             datetime.datetime(2019, 3, 13, 0, 0): {'Selfie': 879,
              'Cat': 7177},
             datetime.datetime(2019, 3, 14, 0, 0): {'Selfie': 872,
              'Cat': 7194},
             datetime.datetime(2019, 3, 15, 0, 0): {'Selfie': 753,
              'Cat': 6335},
             datetime.datetime(2019, 3, 16, 0, 0): {'Selfie': 966,
              'Cat': 5903},
             datetime.datetime(2019, 3, 17, 0, 0): {'Selfie': 996,
              'Cat': 7465},
             datetime.datetime(2019, 3, 18, 0, 0): {'Selfie': 811,
              'Cat': 7013},
             datetime.datetime(2019, 3, 19, 0, 0): {'Selfie': 877,
              'Cat': 7193},
             datetime.datetime(2019, 3, 20, 0, 0): {'Selfie': 772,
              'Cat': 7186},
             datetime.datetime(2019, 3, 21, 0, 0): {'Selfie': 1333,
              'Cat': 6955},
             datetime.datetime(2019, 3, 22, 0, 0): {'Selfie': 774,
              'Cat': 6289},
             datetime.datetime(2019, 3, 23, 0, 0): {'Selfie': 708,
              'Cat': 5786},
             datetime.datetime(2019, 3, 24, 0, 0): {'Selfie': 691,
              'Cat': 6160},
             datetime.datetime(2019, 3, 25, 0, 0): {'Selfie': 900,
              'Cat': 7251},
             datetime.datetime(2019, 3, 26, 0, 0): {'Selfie': 1064,
              'Cat': 6986},
             datetime.datetime(2019, 3, 27, 0, 0): {'Selfie': 885,
              'Cat': 7292},
             datetime.datetime(2019, 3, 28, 0, 0): {'Selfie': 830,
              'Cat': 7214},
             datetime.datetime(2019, 3, 29, 0, 0): {'Selfie': 792,
              'Cat': 6356},
             datetime.datetime(2019, 3, 30, 0, 0): {'Selfie': 795,
              'Cat': 5948},
             datetime.datetime(2019, 3, 31, 0, 0): {'Selfie': None,
              'Cat': None}})
!pip install git+https://github.com/mediawiki-utilities/python-mwviews.git
Collecting git+https://github.com/mediawiki-utilities/python-mwviews.git
  Cloning https://github.com/mediawiki-utilities/python-mwviews.git to /tmp/pip-6usyd656-build
  Requirement already satisfied (use --upgrade to upgrade): mwviews==0.1.0 from git+https://github.com/mediawiki-utilities/python-mwviews.git in /srv/paws/lib/python3.6/site-packages
  Ignoring futures: markers 'python_version < "3.0"' don't match your environment
Requirement already satisfied: requests in /srv/paws/lib/python3.6/site-packages (from mwviews==0.1.0)
Requirement already satisfied: mwcli in /srv/paws/lib/python3.6/site-packages (from mwviews==0.1.0)
Requirement already satisfied: mwapi in /srv/paws/lib/python3.6/site-packages (from mwviews==0.1.0)
Requirement already satisfied: certifi>=2017.4.17 in /srv/paws/lib/python3.6/site-packages (from requests->mwviews==0.1.0)
Requirement already satisfied: idna<2.8,>=2.5 in /srv/paws/lib/python3.6/site-packages (from requests->mwviews==0.1.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /srv/paws/lib/python3.6/site-packages (from requests->mwviews==0.1.0)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /srv/paws/lib/python3.6/site-packages (from requests->mwviews==0.1.0)
Requirement already satisfied: para in /srv/paws/lib/python3.6/site-packages (from mwcli->mwviews==0.1.0)
Requirement already satisfied: docopt in /srv/paws/lib/python3.6/site-packages (from mwcli->mwviews==0.1.0)
#plt.figure(figsize=(25558,54878787))
#sns.distplot(Data['translationId']);
 
revision_parameters = { "action": "query", "prop": "revisions", "titles": gboost_source_title, "rvprop": "timestamp|user|comment", "rvlimit": 100, "rvstartid": gboost_source_revid, "rvslots": "main", "formatversion": "2", "format": "json", "rvdir": "newer" } gboost_revisions = session.get(revision_parameters) gboost_revisions
 
sessionParallel = mwapi.Session(host='https://en.wikipedia.org',
                        user_agent='Miriiyala Pujitha Jaji')


parameters = {'action':'query',
              'format':'json',
              'list':'contenttranslationcorpora',
              'translationid': gboost_tid,
                              'striphtml':True}
               
              
parallel_corpus_res = session.get(parameters)
Parallel = session.get(parameters)
parallel_corpus_parameters = {'action':'query',
                              'format':'json',
                              'list':'contenttranslationcorpora',
                              'translationid':gboost_tid,
                              'striphtml':True}
parallel_corpus_res = session.get(parameters)
parallel_corpus_res
{'batchcomplete': '', 'query': {'contenttranslationcorpora': {'sections': []}}}