I have a .tsv file dataset, and I transformed it into a DataFrame using Pandas. Imagine that my_tsv_file was something like:
A Apple
B Orange
C Pear
To build the DataFrame I used:
df = pandas.read_csv(my_tsv_file, sep='\t')
Now, the first row of my_tsv_file was originally a row part of the data, but it has been transformed to the "key row" in the new DataFrame. So now the Dataframe is something like:
      A Apple
   0  B Orange
   1  C Pear
As "A" and "Apple" were keys, when they actually are not. I would like to add the correct "key row", in order to obtain something like:
      ID Fruit
   0  A  Apple
   1  B  Orange
   2  C  Pear
How can I achieve this? I can't modify the original .tsv file. Please remind that I am at the very beginning with Python and Pandas.
 
    