I am using tabula to read tables form pdf files.
tables = tabula.read_pdf(file, pages="all")
This works fine. Now tables is a list of dataframes, where each data frame is a table fromt eh pdf file.
However the table rows are indexed 0,1,2,3.. etc. But the first row is taken as the column name or header of each dataframe.
Current dataframe:
Component manufacturer DMNS
0 Component name KL32/OOH8
1 Component type LTE-M/NB-IoT
2 Package markings <pin 1 marker>\ ksdc 99cdjh
3 Date code Not discerned
4 Package type 127-pin land grid array (LGA)
5 Package size 26.00 mm × 10.11 mm × 3.05 mm
Desired Dataframe:
0 1
0 Component manufacturer DMNS
1 Component name KL32/OOH8
2 Component type LTE-M/NB-IoT
3 Package markings <pin 1 marker>\ ksdc e99cdjh
4 Date code Not discerned
5 Package type 127-pin land grid array (LGA)
6 Package size 26.00 mm × 10.11 mm × 3.05 mm
How can I do this transformation?