I'm trying to make a data frame from multiple .txt files. It may be important to say, those .txt files used to be .dat files, which I've just converted by changing the .dat to .txt. Anyway, it opens normally with a double click.
My code is:
path = "/home/marlon/Shift One/Projeto Philips/Consolidação de Arquivos/dados/17448"
files = []
for i in os.listdir(path):
if os.path.isfile(os.path.join(path,i)):
files.append(i)
df = pd.DataFrame()
for i in files:
frame = pd.read_csv(i)
df = df.append(frame)
print(df)
The output is:
...
File "pandas/_libs/parsers.pyx", line 384, in pandas._libs.parsers.TextReader.__cinit__
File "pandas/_libs/parsers.pyx", line 695, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: File b'monitor_System_HumTechRoom.txt' does not exist
Thanks for your help!