text_html_output_1.png
import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

bike = pd.read_csv('../input/bike_share.csv')

bike.shape

bike.columns

bike.head(5).T

bike.tail(5).T

bike.isna().sum()

bike.isnull().apply(lambda x: [sum(x), sum(x) * 100 / bike.shape[0]])

bike.describe().T

bike_corr = bike.corr()
bike_corr

bike_cov = bike.cov()
bike_cov

def outlier_detect(bike):
    for i in bike.describe().columns:
        Q1=bike.describe().at['25%',i]
        Q3=bike.describe().at['75%',i]
        IQR=Q3 - Q1
        LTV=Q1 - 1.5 * IQR
        UTV=Q3 + 1.5 * IQR
        x=np.array(bike[i])
        p=[]
        for j in x:
            if j < LTV or j>UTV:
               p.append(j)
        print('\n Outliers for Column : ', i, ' Outliers count ', len(p))
        print(p)

bike.nunique()

bike.duplicated().sum()