text_html_output_1.png
import pandas as pd # for data manipulation/CSV I/O

deliveries = pd.read_csv('../input/deliveries.csv')
matches = pd.read_csv('../input/matches.csv')

Batsman_score = deliveries.groupby('batsman')['batsman_runs'].agg(sum).reset_index().sort_values(by='batsman_runs', ascending=False).reset_index(drop=True)
Top_batsman_score = Batsman_score.iloc[:15, :]
Top_batsman_score

Batsman_Ball_faced = deliveries.groupby(['batsman'])['ball'].count().reset_index().sort_values(by='ball', ascending=False).reset_index(drop=True)
Batsman_Ball_faced_Top = Batsman_Ball_faced.iloc[:15, :]

Batsman_strike_rate = pd.merge(Batsman_score, Batsman_Ball_faced, on='batsman', how='outer')
Batsman_strike_rate = Batsman_strike_rate[Batsman_strike_rate['batsman_runs'] >= 500]
Batsman_strike_rate['strike_rate'] = Batsman_strike_rate['batsman_runs'] / Batsman_strike_rate['ball'] * 100
Batsman_strike_rate = Batsman_strike_rate[['batsman', 'strike_rate']]
Batsman_strike_rate = Batsman_strike_rate.sort_values(by='strike_rate', ascending=False).reset_index(drop=True)
Batsman_strike_rate.iloc[:20, :]