0
I need to join several csv files, where the columns are float. I made a small code, but the output of the columns are in str, so I tried to add the output format of the data, but the following error is coming out:
TypeError: 'dtype' is an invalid keyword argument for this function
Where is the error? Follow the code:
# Abre o arquivo redacao.txt para escrita:
with open("/home/mayna/Downloads/Leo/uniao.csv", "w", dtype=float) as file:
# Percorre a lista de arquivos a serem lidos:
for temp in ["/home/mayna/Downloads/Leo/B116353_2018_FILTRADO.csv", "/home/mayna/Downloads/Leo/B116354_2018_FILTRADO.csv"]:
# Abre cada arquivo para leitura:
with open(temp, "r") as t:
# Escreve no arquivo o conteúdo:
file.writelines(t)
Thank you!
which version of python is using?
– Davi Wesley
I’m using version 3.7.3
– helena