I am working with some data sets here to hone my skills working with csv's. I am experiencing an issue when I go to plot the data. I am working with this dataset: Housing Dataset
I have created a variable from the dataset using a Pandas dataframe and called it: prices_based_on_beds
. My goal is to create a scatter plot of the beds vs. price. Maybe then create a regression model and write a little program to predict the price based on the number of beds, and eventually also based on location (the csv file has location information as well).....
prices_based_on_beds['beds']
a dictionary, will return (sample below)
{0: 2,
1: 3,
2: 2,
3: 2,
4: 2,
5: 3,
6: 3, ...}
The problem I am having lies with the index associated with the value. It shows 0: 2
which as I am sure you can see, creates a problem when trying to make a scatter plot.
How can I clean this data to remove these index values such as 0:
or 6:
so that when I call on prices_based_on_beds['beds']
my return is:
{2, 3, 2, 2, 2, 3, 3, ...}