I want to convert longitude deg, min, sec and latitude deg, min, sec to another form from the original data frame, but in order to do it I need to shift the data from those columns into the right place.
Here is my data frame:
The data in random columns are not in the right place, so can anyone tell me which code to use when shifting the data to the right place. Some need to shift 2 to the right, some need to shift 2 to the right. I tried this code, but it just shifted the whole row and not in the place I want. And when I load and print this csv file, it shows like in the picture, how does it mean by having " \t" between the values. here is what I've tried:
import numpy as np
import pandas as pd
GPS = pd.read_csv("fairfield_loc.csv", encoding = "ISO-8859-1")
print(GPS.head(2))
GPS.loc[1]= GPS.loc[1].shift(1)
print(GPS.head(2))
This is the output:
Thank you!