I'm trying to do data analysis from a self-authored search, the files are already tabbed in .xlsx format. I use openpyxl.
My intention at this point is to get participants' status + their opinion and play in a dictionary.
The problem is that this dictionary is returning only 26 items from random positions.
The solution I am looking for is to: create a diction with states: opinions with all 318 search participants.
My code:
estados = []
u_opiniao = []
estados_x_opiniao = {}
for rowOfCellObjects in ws['B2':'B319']:
for cellObj in rowOfCellObjects:
valorestado = str(cellObj.value)
estados.append(valorestado)
for rowOfCellObjects in ws['J2':'J319']:
for cellObj in rowOfCellObjects:
opiniao_do_u = str(cellObj.value)
u_opiniao.append(opiniao_do_u)
for i in estados:
estado = i
for i in u_opiniao:
opscen = i
estados_x_opiniao[estado] = opscen
Return
Respostas(total): 318
Total de itens no estados_x_opiniao: 26