Question: I have a text file which has 4 attributes like this:

```
    taxi id     date time   longitude   latitude
0   1   2008-02-02 15:36:08     116.51172   39.92123
1   1   2008-02-02 15:46:08     116.51135   39.93883
2   1   2008-02-02 15:46:08     116.51135   39.93883
3   1   2008-02-02 15:56:08     116.51627   39.91034
4   1   2008-02-02 16:06:08     116.47186   39.91248

```

I have read this file in jupyter by using this command:

```
res=pd.read_csv("C:/Users/malik/Desktop/result.txt",low_memory=False)
res.head()  

```

but when i want to fetch out the datatype of attributes by using this code:

```
type(res)
res['longitude'].dtype

```

It gives me error like:

> 
> KeyError: 'longitude'
> 
> 
>

Answer: 
a one-liner use **rev** and **tr** to convert the 2nd line (and rev the 4th) of your input.

```
gunzip -c in.fq.gz | while read L; do echo $L && read L && echo $L | rev  |  tr "ATGCN" "TACGN" && read L && echo $L && read L && echo $L | rev ;done

```
This just prints out the reverse of the sequence. If you have a need for the quality information in the fastq file, you need to take the reverse of that also!

```py
from Bio import SeqIO

with open('sample.fastq') as handle:
    for record in SeqIO.parse(handle, 'fastq'):
        sequence = str(record.seq)
        reverse_sequence = sequence[::-1]
        print(reverse_sequence)

```