Very new here, as in started yesterday with everything. I am working on a way to pull out one of four categories of weather from this csv file. VFR, MVFR, IFR, LIFR are the categories which every row in the csv should have.
import pandas as pd
ap1 = input('Airport 1: ')
ap2 = input('Airport 2: ')
cat = pd.read_csv('https://www.aviationweather.gov/adds/dataserver_current/current/metars.cache.csv', skiprows=5,
index_col='station_id', usecols=['station_id', 'flight_category'])
ap1_cat = cat.loc[ap1]
ap2_cat = cat.loc[ap2]
if ap1_cat == 'VFR':
print('Green')
elif:
ap1_cat == 'MVFR':
print('Blue')
else:
print('Fail')
I basically want to say, if flight_category is VFR Print 'Green' etc Any help is appreciated