From 661e4099cb494625e64eb2b018b580702ef757a8 Mon Sep 17 00:00:00 2001 From: AlexisEidelman Date: Thu, 20 Apr 2017 17:02:50 +0200 Subject: [PATCH] extension mail --- extenstion_mail.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 extenstion_mail.py diff --git a/extenstion_mail.py b/extenstion_mail.py new file mode 100644 index 0000000..22ae9b0 --- /dev/null +++ b/extenstion_mail.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +""" + +""" + +import pandas as pd + +tab = pd.read_csv('csv\\annuaire_20160905.csv', encoding='cp1252') +serie_exstension = tab['an/adresseCourriel'].str.split('@').str[1] + +liste_extension = serie_exstension[serie_exstension.notnull()].unique() + +gouvfr = [x for x in liste_extension if x[-7:] == 'gouv.fr'] +ambassade = [x for x in liste_extension if 'ambafrance' in x] +not_gouvfr_nor_ambassade = [x for x in liste_extension + if x not in gouvfr and x not in ambassade] + +serie_exstension[serie_exstension.isin(not_gouvfr_nor_ambassade)].value_counts()