I am using pandas for the first time, and in the data frame there is a piece of data that is a percentage as a string but when put into a dataframe and printed it shows up as NaN. So to test it i just used a print statement and it returns the value fine. Thank you!
def makeSheet():
data = [schoolName, location, aceptanceRate, tuition, roomAndBoard, debtAtGrad, studentToTeacher, satReq, totalUndergrad]
dataDictonary = {"School Name": schoolName, "Location": location, "Aceptance Rate": aceptanceRate, "Tuition": tuition, "Room & Board": roomAndBoard, "Estimated Debt at Grad": debtAtGrad, "Student:Teacher": studentToTeacher,
"SAT Req": satReq, "Total Number of Undergrads": totalUndergrad}
df = pd.DataFrame(dataDictonary, columns=headers, index=[0])
print(df)
print(aceptanceRate)
the pandas data table returned: pandas data table
The print statement returned: 31%
Answer: I had to ensure the spelling was the same across both acceptance rates. As in the dataDictonary one had to match the headers one. Thank you to Ignatius Reilly for the help