/python_filereader

Data management automation tool. PyPDF2 reads unique identifiers from files and the OS library renames the files in-place with each corresponding identifier.

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Python File Reader

Background: My team and I are responsible for the data analysis and management of hundreds of mortality data files received from the Chief Medical Examiner's Office on a monthly basis. A solution was needed to continually rename incoming files with required information, including a case identifier number unique to each mortality case.

Solution: This Python script uses OS, Pandas, and PyPDF2 to read unique case identifiers from each file. The identifiers are temporarily stored in a data frame. The information then populates each file name, and data manipulation is done to rename files with their respective case year and date received. The files are batch-renamed in-place.