I am trying to parse through housing data I scraped off of the web. For each house, I am storing the characteristics within a list. I want to put each house's characteristics (e.g., bedrooms, bathrooms, square feet, etc.) into a row of the same pandas dataframe. However, when I try the code below, the headers of my dataframe appear, but not any of the contents. What am I missing here?
def processData(url):
#Rest of function omitted as it is not relevant to the question at hand.
entry = [location, price, beds, baths, sqft, lotSize, neighborhoodMed, dom, built, hs,
garage, neighborhood, hType, basementSize]
df = pd.DataFrame(columns = ["Address", "Price", "Beds", "Baths", "SqFt", "LotSize",
"NeighborhoodMedian", "DOM", "Built", "HighSchool", "Garage",
"Neighborhood", "Type", "BasementSize"])
df.append(entry) #This line doesn't work
return df