I updated my AT proposals to be more specific
I found a data set on CO2 emissions from gapminder.org and saved it as a CSV file so that I could use it in spyder
I started to code so that I could read the data in order to make my scatter plot
I first used this code:
#pandas, numpy, and matplotlib.pyplot are libraries (add-ons)
import pandas
import numpy as np
import matplotlib.pyplot as plt
#this code allows you to read the Python U2P1 file and call it plt
#so that you will be able to access the file easier
data = pandas.read_csv("co2_emissions.csv", low_memory=False)
#the following code allows python to count the distribution of t
print("2012")
response_exp = data["2012"].value_counts(sort=False)
print(response_exp) But it gave me this error UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 0: invalid start byte after looking up what this meant for a while and having no luck I decided to look up another way of reading a CSV
I found this video https://www.youtube.com/watch?v=K_oXb04izZM that showed a way I tried this and I was able to see what was in the data, but this was a long list of numbers
I continued following along with the video and he started talking about only seeing data from certain things which is what I wanted it because the data spans from 1700s to 2013 I only wanted 2000 and 2012 to start. I used the code import csv with open('co2_emissions.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
2000 = []
2012 = []
for row in readCSV:
2000 = row[241]
2012 = row[252]
2000.append(2000)
2012.append(2012)
print(2000)
print(2012) this didn't work because of syntax in the append, I am still trying to figure that out because I can't make a graph if I can't read the data.
I emailed Darlene because I wanted to go back to the code I originally used and figure out want the error means and how I can get past it.