#for loading data
import pandas as pd
#for data visualization
import matplotlib.pyplot as plt
odi_wickets=pd.read_csv('odi_wickets.csv')
#Dropping irrelevant columns
odi_wickets.drop(['4','5'],axis=1,inplace=True)
odi_wickets.head()
data_type_of_attribute=odi_wickets.info()
data_type_of_attribute
odi_wickets.isna().sum()
print("MEAN")
print()
print(odi_wickets.mean(numeric_only=True))
print('___________________________________')
print()
print("MEDIAN")
print()
print(odi_wickets.median(numeric_only= True))
print('___________________________________')
print()
print("MODE")
print()
print(odi_wickets.mode().head(3))
print('___________________________________')
print()
maximum_values=odi_wickets.max(numeric_only=True)
print('Maximum Values from each attribute of the given dataset')
print('_______________________________________________________')
maximum_values
minimum_values=odi_wickets.min(numeric_only=True)
print('Minimum Values from each attribute of the given dataset')
print('_______________________________________________________')
minimum_values
range_of_attributes=maximum_values-minimum_values
print('Range of each attributes of the given dataset')
print('_______________________________________________________')
range_of_attributes
print("Variance of each attributes in the dataset")
print('__________________________________________')
variance=odi_wickets.var(numeric_only=True)
variance
print("Standard deviation of each attributes in the dataset")
print('____________________________________________________')
std=odi_wickets.std(numeric_only=True)
std
counts=odi_wickets["Country"].value_counts()
print("Counts of unique data points in the given variable")
print('___________________________________________________')
counts
counts.plot.bar(xlabel="Country",ylabel="No of Player",
title="No of players belongs to each country form total players")
plt.show()
# IN percentage
proportion=odi_wickets["Country"].value_counts(normalize=True)*100
print("Counts of unique data points in the given variable in (%)")
print('_________________________________________________________')
proportion
proportion.plot.bar(xlabel="Country",ylabel="proportion of players in (%)",
title="Proportion of players shared by each country form total proportion")
plt.show()
print('Histogram Plots for some of the Numerical attributes in the dataset')
print('___________________________________________________________________')
print()
columns=['Career Span','Matches','Average','Economy']
odi_wickets[columns].hist(figsize=(10,10),rwidth=2,layout=(2,2))
plt.show()