André,
Copiei o seu código e executei aqui, funcionou normalmente... Vou mostrar os arquivos junto com o código que usei:
acesso.csv
acessou_home,acessou_como_funciona,acessou_contato,comprou
1,1,0,0
1,1,0,0
1,1,0,0
1,1,0,0
1,1,0,0
1,0,1,1
1,1,0,0
1,0,1,1
1,1,0,0
1,0,1,1
1,1,0,1
1,0,1,1
0,0,1,0
0,0,1,0
0,0,1,0
0,0,1,0
0,0,1,0
0,1,0,0
0,0,1,0
0,1,0,0
0,0,1,0
0,1,0,0
0,0,1,0
0,1,0,0
1,0,1,1
1,1,1,1
1,1,1,1
1,0,1,1
0,1,0,0
0,0,1,0
0,1,0,0
1,0,1,1
0,0,1,0
1,0,1,1
1,0,1,1
1,0,1,1
1,0,1,1
0,0,1,0
1,1,0,0
1,0,1,1
0,1,0,0
0,0,1,0
0,1,0,0
1,0,1,1
0,0,1,0
0,0,1,0
1,0,1,1
1,0,1,1
1,1,0,0
1,1,0,0
1,1,0,0
1,1,0,0
1,0,1,1
1,1,0,0
1,0,1,1
1,1,0,0
1,0,1,1
1,1,0,0
1,0,1,1
0,0,1,0
1,0,1,1
0,1,0,0
0,0,1,0
0,1,0,0
1,0,1,1
0,1,1,1
0,0,1,0
1,0,1,1
1,0,1,1
1,1,0,0
1,1,0,0
0,0,1,0
0,0,1,0
0,0,1,0
0,0,1,0
0,1,0,0
0,0,1,0
0,1,0,0
0,0,1,0
1,1,0,1
0,0,1,0
0,0,1,0
0,0,1,0
1,0,1,1
1,0,1,1
1,1,0,0
1,1,0,0
0,0,1,0
0,0,1,0
1,0,1,1
1,0,1,1
1,1,0,0
1,1,0,0
0,0,1,0
0,0,1,0
1,1,1,1
0,0,1,0
0,1,0,0
0,0,0,0
dados.py
import csv
def carregar_acessos():
X = []
Y = []
arquivo = open('acesso.csv', 'r')
leitor = csv.reader(arquivo)
for acessou_home,acessou_como_funciona,acessou_contato, comprou in leitor:
X.append([acessou_home,acessou_como_funciona
,acessou_contato])
Y.append([comprou])
return X, Y
main.py
from dados import carregar_acessos
X, Y = carregar_acessos()
print X
print Y
Resultado após execução:
[['acessou_home', 'acessou_como_funciona', 'acessou_contato'], ['1', '1', '0'], ['1', '1', '0'], ['1', '1', '0'], ['1', '1', '0'], ['1', '1', '0'], ['1', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['1', '0', '1'], ['1', '1', '1'], ['1', '1', '1'], ['1', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['1', '0', '1'], ['0', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['0', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['1', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['1', '1', '0'], ['1', '1', '0'], ['1', '1', '0'], ['1', '1', '0'], ['1', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['1', '1', '0'], ['1', '0', '1'], ['0', '0', '1'], ['1', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['1', '0', '1'], ['0', '1', '1'], ['0', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['1', '1', '0'], ['1', '1', '0'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['0', '1', '0'], ['0', '0', '1'], ['1', '1', '0'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['1', '1', '0'], ['1', '1', '0'], ['0', '0', '1'], ['0', '0', '1'], ['1', '0', '1'], ['1', '0', '1'], ['1', '1', '0'], ['1', '1', '0'], ['0', '0', '1'], ['0', '0', '1'], ['1', '1', '1'], ['0', '0', '1'], ['0', '1', '0'], ['0', '0', '0']]
[['comprou'], ['0'], ['0'], ['0'], ['0'], ['0'], ['1'], ['0'], ['1'], ['0'], ['1'], ['1'], ['1'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['1'], ['1'], ['1'], ['1'], ['0'], ['0'], ['0'], ['1'], ['0'], ['1'], ['1'], ['1'], ['1'], ['0'], ['0'], ['1'], ['0'], ['0'], ['0'], ['1'], ['0'], ['0'], ['1'], ['1'], ['0'], ['0'], ['0'], ['0'], ['1'], ['0'], ['1'], ['0'], ['1'], ['0'], ['1'], ['0'], ['1'], ['0'], ['0'], ['0'], ['1'], ['1'], ['0'], ['1'], ['1'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['0'], ['1'], ['0'], ['0'], ['0'], ['1'], ['1'], ['0'], ['0'], ['0'], ['0'], ['1'], ['1'], ['0'], ['0'], ['0'], ['0'], ['1'], ['0'], ['0'], ['0']]
Veja que foi de boa... Estou usando Linux versão Ubuntu 16.04 - Python 2.7.12. Provalmente, o que deu ruim foi o arquivo csv. Pode tentar verificar e testar novamente?