'Get the file path for files in nested folders using python pandas [closed]

I want to print the file path for the files and not directories located in nested folders using pandas. The path where the folder is located changes. The code should read the dynamic file path and print the path where the csv files are stored.



Solution 1:[1]

You can use the os library with the method walk.

You have few examples here:

read all files in sub folder with pandas

Do I understand os.walk right?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kertoya