I have a PDF file and about 130 .txt files.
The PDF file is useless and needs to be skipped over. Each .txt file contains name data, and each .txt file represents a year ranging from 1880-2010.
All of the .txt files have the same format: Name, Sex, Count of people that had that name in that specific year. Below is an example of one of the .txt files:
Mary,M,8754
Susan,M,5478
Brandy,M,5214
etc...
There are probably thousands of names in each .txt file. My question is basically what the title asks though. I would like to know how I can effiecetnly take each .txt file and put them into sepearte but accessiable DataFrames. I want to be able to quickly search through and extract things like the mean or standard deviation of a specific name.
I've already looked into multiple topics with similar questions/concerns, but none of them have been of any real use to me:
Import multiple csv files into pandas and concatenate into one DataFrame Read multiple *.txt files into Pandas Dataframe with filename as column header
creating pandas data frame from multiple files
Any and all advice is appreciated.