Statistical Analysis Ford
Statistical Analysis Ford
import pandas as pd
file=r"C:\Users\amine\Downloads\Amine_programing\Vs_code_app\IBM_Python\Car_Sales_Kaggle.xlsx"
df=pd.read_excel(file,sheet_name="Car_sales")
print(df)
forddf=df[df["Manufacturer"]=="Ford"]
print(forddf)
Manufacturer Model Unit Sales Price Year Resale Value \
44 Ford Escort 70227 12070 7425
45 Ford Mustang 113369 21560 12760
46 Ford Contour 35068 17035 8835
47 Ford Taurus 245815 17885 10055
48 Ford Focus 175670 12315 8670
49 Ford Crown Victoria 63403 22195 14210
50 Ford Explorer 276747 31930 16640
51 Ford Windstar 155787 21410 13175
52 Ford Expedition 125338 36135 23575
53 Ford Ranger 220650 12050 7850
54 Ford F-Series 540561 26935 15075
Select only the most usefull columns ,The new dataframe is dfsdy
We will calculate the Mean ( the average ) of unit sales , price , Reaal vamue and horse power
We will calculate mediane ( the number who occure as central tendancy) of unit sales , price , Reaal vamue and horse power
We will calculate standard deviatioon of unit sales , price , Reaal vamue and horse power
we will create our distribution graph for unit sales , year resale value, horse power, and price
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
meanpriceford = dfsdy['Price'].mean()
meanunitsalesford=dfsdy["Unit Sales"].mean()
<matplotlib.legend.Legend at 0x1ff3d552c10>
<Figure size 800x600 with 0 Axes>
<Figure size 800x600 with 0 Axes>
<Figure size 800x600 with 0 Axes>
<Figure size 800x600 with 0 Axes>