2
I’m learning to code in python and I’m having trouble opening a specific file. In case I can open text documents normally, but when there is space in the file name it does not locate the file. Thanks in advance for your help.
Ex diretorio: C: Desktop users File folder list Telefonica.txt
I’m using the code
import pandas as pd
from datetime import datetime, timedelta
import numpy as np
import matplotlib.pyplot as plt
basedf = pd.read_csv('C:\Users\Desktop\Pasta do arquivo\lista telefonica.txt', delimiter="\t", dtype=str)
Report received by the tool
FileNotFoundError: [Errno 2] File C:\Users\Pasta do arquivo lista telefonica.txt does not exist: 'C:\\Users\\Pasta do arquivo\xlista telefonica.txt
Thank you.
Note that in "report", the file name not found is "xlista Telefonica"?
– Woss
I noticed yes, na realized the real name of the file starts with 0201 FILE and actually it replaced the zero with x
– Daniel Santana Schaefer