I am webscraping housing data and putting it into a pandas dataframe. I wanted to test my function for one listing before continuing on several. My only problem is the way the entry is being added to the dataframe.
The listing information is being added as a column instead of a row (I want it added as a row). Here is what I am doing. Is there a better function to use? Thanks in advance!
entry = pd.DataFrame([location, price, beds, baths, sqft, lotSize, neighborhoodMed, dom, built,
garage, neighborhood, hType, basementSize])
df = pd.DataFrame(columns = ["Address", "Price", "Beds", "Baths", "SqFt", "LotSize",
"NeighborhoodMedian", "DOM", "Built", "Garage",
"Neighborhood", "Type", "BasementSize"])
df = pd.concat([df, entry])
Side note: location, price, beds, etc. are all values.
(e.g., a location could be 123 Main St
, a price could be 495,000
, etc.)