Created
August 28, 2018 02:54
-
-
Save akash-joshi/75938813f4bfe37ba35efaa4f0460d04 to your computer and use it in GitHub Desktop.
Displaying some attributes about iris dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Jul 18 16:59:56 2018 | |
@author: akash.joshi | |
""" | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
x=pd.read_csv("iris.csv") | |
print("Max is : ",x["sepal_length"].max()) | |
print("Min is : ",x["sepal_length"].min()) | |
print("Mean is : ",x["sepal_length"].mean()) | |
print("Range is : ",x["sepal_length"].max()-x["sepal_length"].min()) | |
print("Standard Deviation is : ",x["sepal_length"].std()) | |
print("Variance is : ",x["sepal_length"].var()) | |
print("Percentiles : ",x["sepal_length"].quantile(.25),x["sepal_length"].quantile(.5),x["sepal_length"].quantile(.75)) | |
#x["sepal_length"].plot(kind="hist") | |
#x.plot(kind="box") | |
print(x.describe(include="all")) # include all to not exclude other datatypes | |
print("Number of features : ",x.iloc[0].count())#.count(axis=1)) | |
print(x.dtypes) # returns datatypes of objects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment