0% found this document useful (0 votes)
35 views2 pages

Mtcars - Ipynb - Colab

Colab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Mtcars - Ipynb - Colab

Colab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

07/08/2024, 10:43 mtcars.

ipynb - Colab

import pandas as pd
mtcars = pd.read_csv('mtcars.csv')
mtcars_summary = mtcars.describe()
print("summary Statistics for mtcars dataset:")
print(mtcars_summary)
print("\n Data Type informatiom for mtcars dataset:")
print(mtcars.info())
mtcars_quartiles=mtcars.describe(percentiles=[0.25,0.5,0.75])
print("\n Quartile information for mtcars dataset:")
print(mtcars_quartiles)
cars=pd.read_csv('/content/car.csv')
cars_summary = cars.describe()
print("summary Statistics for cars dataset:")
print(cars_summary)
print("\n Data Type informatiom for cars dataset:")
print(cars.info())
cars_quartiles=cars.describe(percentiles=[0.25,0.5,0.75])
print("\n Quartile information for cars dataset:")
print(cars_quartiles)

qsec vs am gear carb


count 32.000000 32.000000 32.000000 32.000000 32.0000
mean 17.848750 0.437500 0.406250 3.687500 2.8125
std 1.786943 0.504016 0.498991 0.737804 1.6152
min 14.500000 0.000000 0.000000 3.000000 1.0000
25% 16.892500 0.000000 0.000000 3.000000 2.0000
50% 17.710000 0.000000 0.000000 4.000000 2.0000
75% 18.900000 1.000000 1.000000 4.000000 4.0000
max 22.900000 1.000000 1.000000 5.000000 8.0000

Data Type informatiom for mtcars dataset:


<class 'pandas.core.frame.DataFrame'>
RangeIndex: 32 entries, 0 to 31
Data columns (total 12 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 model 32 non-null object
1 mpg 32 non-null float64
2 cyl 32 non-null int64
3 disp 32 non-null float64
4 hp 32 non-null int64
5 drat 32 non-null float64
6 wt 32 non-null float64
7 qsec 32 non-null float64
8 vs 32 non-null int64
9 am 32 non-null int64
10 gear 32 non-null int64
11 carb 32 non-null int64
dtypes: float64(5), int64(6), object(1)
memory usage: 3.1+ KB
None

Quartile information for mtcars dataset:


mpg cyl disp hp drat wt \
count 32.000000 32.000000 32.000000 32.000000 32.000000 32.000000
mean 20.090625 6.187500 230.721875 146.687500 3.596563 3.217250
std 6.026948 1.785922 123.938694 68.562868 0.534679 0.978457
min 10.400000 4.000000 71.100000 52.000000 2.760000 1.513000
25% 15.425000 4.000000 120.825000 96.500000 3.080000 2.581250
50% 19.200000 6.000000 196.300000 123.000000 3.695000 3.325000
75% 22.800000 8.000000 326.000000 180.000000 3.920000 3.610000
max 33.900000 8.000000 472.000000 335.000000 4.930000 5.424000

qsec vs am gear carb


count 32.000000 32.000000 32.000000 32.000000 32.0000
mean 17.848750 0.437500 0.406250 3.687500 2.8125
std 1.786943 0.504016 0.498991 0.737804 1.6152
min 14.500000 0.000000 0.000000 3.000000 1.0000
25% 16.892500 0.000000 0.000000 3.000000 2.0000
50% 17.710000 0.000000 0.000000 4.000000 2.0000
75% 18.900000 1.000000 1.000000 4.000000 4.0000
max 22.900000 1.000000 1.000000 5.000000 8.0000
summary Statistics for cars dataset:
Year Selling_Price Present_Price Kms_Driven Owner
count 301.000000 301.000000 301.000000 301.000000 301.000000
mean 2013.627907 4.661296 7.628472 36947.205980 0.043189
std 2.891554 5.082812 8.644115 38886.883882 0.247915
min 2003.000000 0.100000 0.320000 500.000000 0.000000

Start coding or generate with AI.

https://colab.research.google.com/drive/1o2pw9gjMi1-8VKbR7AOLsnecte_7Hf6x#scrollTo=2tL5eprRK4an 1/2
07/08/2024, 10:43 mtcars.ipynb - Colab

https://colab.research.google.com/drive/1o2pw9gjMi1-8VKbR7AOLsnecte_7Hf6x#scrollTo=2tL5eprRK4an 2/2

You might also like