Missing Values & NaN
If the data we have imported contains missing values, Pandas will go ahead and enter “NaN” into the cell for you. It’s up to you what you want to do with that “NaN”. Here is how to fill (replace) that data:
Use the function “fillna()” to fill in NaN values:
Dataframe.fillna(self, value = none, method = none, axis = none, inplace = false, limit = none, downcast = none)
I modified this for my scenario:
car_sales_missing[“Odometer”] = car_sales_missing[“Odometer”].fillna(car_sales_missing[“Odometer”].mean(),inplace=True)
Pandas should come pre-loaded with matplotlib up and running, but if not just run these two lines:
Import matplotlib.pyplot as plt
Note: To display a plot inside Jupyter you…
Lets try out the different things we can do with the data to give us more information about it.
Executing “##” will enter a new paragraph line with text (note: must be in Markup: Esc -> M)
Returns data types: Car_sales.dtypes,
Returns data columns: car_columns.index
What the heck is Pandas? A cute high-fiving bear?
In this case, Pandas is a two-dimensional data-frame used in the Jupyter Environment
From the Anaconda Prompt explore and activate Conda:
conda env list
conda activate c:\users\Thund\desktop\sample_project_1\env
Making a data frame from scratch:
Inside the Notebook, the interface is 1 blank horizontal cell with typical file menu options running atop. The cell can contain Code (python) or Markdown (text). The cell numbers are a history of executed code or markdown.
Different things I can do inside the Jupyter Notebook:
From the selected cell…
I am starting a new blog today. My goal with this new blog is to document my learning experiences as I explore the Data Science world. I will be periodically posting details of the problems I am trying to solve, technologies used, and datasets, along with associated results…