have dataframe gapminder and every column is organized as separate list using code as below:
How can I perform this task? Tried this:
Thx
country = df.country.to_list() continent = df.continent.to_list() year = df.year.to_list()I have created an empty list country_1990 and I want to populate it with data from year 1990 by looping over the original list country
How can I perform this task? Tried this:
for i in range(len(df.country)): if df.loc[df['year']== 1990 : country_1990.append(df.country[i]) print(country_1990)to check at each iteration of the loop if the associated record is from 1990 but not working
Thx