New to python,
Trying to sort a dataset ready for comparison using pandas however I need to edit certain aspects before a comparison is possible. There is an 'A' before each of my dates which needs to be removed. In addition to this, the format of the date itself is YYYYDDD which needs to be change to DD/MM/YYYY or my other dataset needs to be changed to YYYYDDD, whichever is easiest.
My attempt to remove the 'A' is as follows, I have no idea where to even begin in relation to modifying the date apart from perhaps using the library 'datetime'.
import pandas as pd
import datetime
csv = '/home/student/Desktop/Ben_Folder/AirQuality/Test/2002_DDV.csv'
df = pd.read_csv(csv)
test = df(columns='Date'[1:7])
test.to_csv('Test.csv', header=['Date', 'AOD'])
Example of dataset as follows:
Date AOT
0 A2002185 0.0
1 A2002185 0.0
2 A2002185 0.0
3 A2002185 0.0
4 A2002185 0.0