Skip to content
Advertisement

Tag: filenames

Combine two tables based on certain criteria using python

I have two tables (table1, table2) of the following: table1: ID Filename 12345 12345.txt 12346 12346.txt 12347 12347.txt 12348 12348.txt 12349 12349.txt 12350 12350.txt table2: contains the path where table 1 files are present Path /table/text3/12349.txt /table/text1/12345.txt /table/text2/12346.txt /table/text1/12350.txt /table/text3/12347.txt /table/text1/12348.txt How do I combine these two files, such that, the path and filenames are matched. What I tried so

Build the full path filename in Python

I need to pass a file path name to a module. How do I build the file path from a directory name, base filename, and a file format string? The directory may or may not exist at the time of call. For example: I need to create a string ‘/home/me/dev/my_reports/daily_report.pdf’ Concatenating the pieces manually doesn’t seem to be a good

Advertisement