import pandas as pd

fifa2019 = pd.read_csv('fifa2019.csv')

#print(fifa2019.shape)

#print(fifa2019.info())

sub1 = fifa2019.loc[14]
#print(sub1)

sub2 = fifa2019.loc[2:16]
#print(sub2)
sub3 = fifa2019.loc[:,['Name', 'Preferred Foot']]
#print(sub3)

sub4 = fifa2019.iloc[0:10,1:3]
#print(sub4)



korea_player=fifa2019['Nationality']=='Korea Republic'
#print(korea_player)
sub5 = fifa2019.loc[korea_player]
#print(sub5)

sub6 = sub5['Name']
#print(sub6)


import matplotlib.pyplot as plt

#print(fifa2019['Preferred Foot'].value_counts())
fifa2019['Preferred Foot'].value_counts().plot(kind='bar')
plt.legend()
plt.show()


fifa2019['Preferred Foot'].value_counts().plot(kind='pie', autopct='%1.f%%')
plt.legend()
plt.show()

'''
fifa2019['Age'].value_counts().plot(kind='barh')
plt.legend()
plt.show()

'''
