<jupyter_start><jupyter_text>Import the libraries needed.<jupyter_code>import os
import sys
import pandas as pd<jupyter_output><empty_output><jupyter_text>First. clean up the picture field<jupyter_code>ppl_file = 'clean_lab.csv'
df = pd.read_csv(ppl_file)
df
df.picture.replace(pd.NA, 'alias.jpeg',inplace=True)
df
df.to_csv('new.csv')
import shutil
# from shutil import copyfile
 
def copyFile(src, dest):
    try:
        shutil.copy(src, dest)
    # eg. src and dest are the same file
    except shutil.Error as e:
        print('Error: %s' % e)
    # eg. source or destination doesn't exist
    except IOError as e:
        print('Error: %s' % e.strerror)
copyFile('processed_images/antoniobianchi_face_hu090e5de1231172daa89c0023d6a3a196_207838_1ec46bf307a73a55f922a9116631a227.png',"/home/ncs/Desktop/newb.png")

import csv

filename = ppl_file

with open(filename, 'r') as csvfile:
    datareader = csv.reader(csvfile)
    for row in datareader:
        if row[3] != 'last_name' and row[1] != 'alias.jpeg':
            print(row[3].lower()+"-"+row[2][0].lower(), "\t",row[1])
            #print(row)<jupyter_output>vigna-g 	 vigna.png
kruegel-c 	 chris2.jpg
machiry-a 	 machiry.png
redini-n 	 nilo.jpg
gustafson-e 	 edg_profile.png
salls-c 	 salls-grayscale.jpg
spensky-c 	 chad.png
das-d 	 dipanjan.png
aghakhani-h 	 hojjat.jpg
mariani-s 	 sebastiano-mariani.jpg
bose-p 	 Priyanka.jpg
meng-d 	 file.jpg
gritti-f 	 fabio_gritti.jpg
burk-k 	 burke.png
mclaughlin-r 	 robert.png
garg-c 	 chinmay.jpeg
senthilkumar-s 	 sid.jpg
continella-a 	 headshot_grayscale.jpg
pagani-f 	 fpagani.jpeg
spahn-n 	 nspahn.png
kemmerer-r 	 kemmhead3.jpeg
balzarotti-d 	 me.jpg
valeur-f 	 fredrikval2.jpg
cavallaro-l 	 cavallaro.jpg
egele-m 	 img_7268-2.jpg
hauser-c 	 christophe_seclab_profile.png
hao-s 	 shuang.png
lindorfer-m 	 mlindorfer.png
nilizadeh-s 	 shirin--.jpg
maggi-f 	 fede.jpg
stringhini-g 	 gian.jpg
gilbert-b 	 bob.jpg
stone-gross-b 	 brett.jpg
robertson-w 	 wil_headshot_bw.jpg
kapravelos-a 	 prof.jpg
doupé-a 	 adam_doupe_headshot_9_19_14.jpg
cova-m 	 cova.jpg
invernizzi-l 	 invernizzi.jpg
shoshitaishvili-y 	 yan_b[...]
{'fraction_non_alphanumeric': 0.10959548447789276, 'fraction_numerical': 0.03292568203198495, 'mean_word_length': 3.6441048034934496, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '519678', 'license': 'MIT', 'n_tokens_mistral': 1011, 'n_tokens_neox': 908, 'n_words': 166, 'path': 'custom-tooling/CSV Scratchpad.ipynb', 'repo_name': 'Dist-Systems/dist-systems.github.io', 'size': '2126'}