acrocephalus 0 Learning

Hello,
I am generating batch qr codes using the qrcode 5.0.1 package and the following code:

from qrcode import *
import os,dateutil
import pandas as pd
from PIL import Image
#Importar base de dades
pathFile = ('E:\Usuarios\Daniel\Documents\APNAE\QR\Llistat_socis_alta.csv')
socisAPNAE = pd.read_csv(pathFile, delimiter = ';', encoding='ISO-8859-1')

#generar codi QR
for i in range(0,len(socisAPNAE.index)):    
    soci = socisAPNAE.iloc[i,0:6]
    nom = socisAPNAE.iloc[i,1]
    qr = QRCode(version=20, error_correction=ERROR_CORRECT_L)
    qr.add_data(soci)
    qr.make()
    im = qr.make_image()
    im.save('E:/Usuarios/Daniel/Documents/APNAE/QR/CodisQRSocisAPNAE/%s.jpeg' % nom)

When I decode the qr code, I get this info:

> Soci número                               4
> Nom                      ------------------
> Població             'CASTELLÓ D''EMPÚRIES'
> NIF Soci                          ---------
> Tipus de soci             SOCI (INDIVIDUAL)
> Data de naixement                ----------
> Name: 1, dtype: object

I've deleted the private data and substitute it with dashes. Here I'd like to 1) delete the last row, as it is not in the original CSV file and 2) instead of getting 'CASTELLÓ D''EMPÚRIES' I'd like to get CASTELLÓ D'EMPÚRIES (encoding problem?). Finally, is there any way to overlay a logo without losing the qr code info?
Can anyone help?
Cheers!

Dani

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.