I have a text file which has multiple tables inside, and I was wondering what a good approach would be for this? Below is an example of what the text file might look like.
Employee Table:
Name Description Type
Bob Employee Standard
Jim Employee Standard
james Employee Standard
Tools:
Item Serial Tag
Battery 0101 B.
Drill 9292 D.
Phone 8464 P.
Locations:
Station code len
West 12 9
North 1 9
East 21 9
I originally tried splicing by index:
instance_of_employee=df.loc[df['x'].str.contains("Employee table", case=True, na=False)]
employees=df.loc[instance_of_employee.index[0]:Instance_of_tools.index[0]-1 ]
But I found out these files can show up in random orders. The name however is always the same... 'Employee table', 'Tools', and 'Locations'
Is it possible to read the dataframe line by line and then where these titles exist, make them new dataframes?