text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/fifa19/data.csv')

percent_null = []
n_col = df.columns
for col in n_col:
    percent_null.append(df[col].isnull().sum() / len(df[col]) * 100)
df_missing = pd.DataFrame(percent_null, index=df.columns, columns=['percent_missing'])
df_missing = df_missing.reset_index().rename({'index': 'column_name'}, axis=1)
df_missing = df_missing[df_missing['percent_missing'] > 0].sort_values(by='percent_missing', ascending=False)
clr = ['steelblue' if percent > 10 else 'skyblue' for percent in df_missing['percent_missing']]

def make_distplot(data,title):
    fig,ax=plt.subplots(figsize=(10,5))
    ax.set_title(title)
    sns.distplot(data,bins=30)

def horizontal_bar(data,x,y,title):
    fig,ax=plt.subplots(figsize=(10,5))
    sns.barplot(data=data,x=x,y=y,color='steelblue')
    ax.set_xlabel(x)
    ax.set_ylabel(y)
    ax.set_title(title)

df['Wage'] = df['Wage'].str.extract('(\\d+)')
df['Wage'] = df['Wage'].astype('float64')
highest_wage = df[['Name', 'Wage']].sort_values(by='Wage', ascending=False)[:20]
horizontal_bar(highest_wage, 'Wage', 'Name', 'Players with Highest Wage')