programming (1)


python- scan and read files

Hi,

If you want to scan and read specific types of files. This could vary according to your needs. Some cases , I used these to perform such tasks

  1. read all csv files in specific directory
  2. read all text files having some specific initials
  3. bulk renaming of files

I use glob to find files and read them using specific readers. Reading files in raw format is my specific choice ( for text and csv files if not well formatted), CSVReader to read csv files and Pandas file reader to read most types of files.