Session 17 Pandas Dataframes
Session 17 Pandas Dataframes
import pandas as pd
Creating DataFrame
# using lists
student_data = [
[100,80,10],
[90,70,7],
[120,100,14],
[80,50,2]
]
pd.DataFrame(student_data,columns=['iq','marks','package'])
iq marks package
0 100 80 10
1 90 70 7
2 120 100 14
3 80 50 2
# using dicts
student_dict = {
'name':['nitish','ankit','rupesh','rishabh','amit','ankita'],
'iq':[100,90,120,80,0,0],
'marks':[80,70,100,50,0,0],
'package':[10,7,14,2,0,0]
}
students = pd.DataFrame(student_dict)
students.set_index('name',inplace=True)
students
iq marks package
name
nitish 100 80 10
ankit 90 70 7
rupesh 120 100 14
rishabh 80 50 2
amit 0 0 0
ankita 0 0 0
# using read_csv
movies = pd.read_csv('movies.csv')
movies
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
1 Battalion 609 tt9472208
2 The Accidental Prime Minister (film) tt6986710
3 Why Cheat India tt8108208
4 Evening Shadows tt6028796
... ... ...
1624 Tera Mera Saath Rahen tt0301250
1625 Yeh Zindagi Ka Safar tt0298607
1626 Sabse Bada Sukh tt0069204
1627 Daaka tt10833860
1628 Humsafar tt2403201
poster_path \
0 https://upload.wikimedia.org/wikipedia/en/thum...
1 NaN
2 https://upload.wikimedia.org/wikipedia/en/thum...
3 https://upload.wikimedia.org/wikipedia/en/thum...
4 NaN
... ...
1624 https://upload.wikimedia.org/wikipedia/en/2/2b...
1625 https://upload.wikimedia.org/wikipedia/en/thum...
1626 NaN
1627 https://upload.wikimedia.org/wikipedia/en/thum...
1628 https://upload.wikimedia.org/wikipedia/en/thum...
wiki_link \
0 https://en.wikipedia.org/wiki/Uri:_The_Surgica...
1 https://en.wikipedia.org/wiki/Battalion_609
2 https://en.wikipedia.org/wiki/The_Accidental_P...
3 https://en.wikipedia.org/wiki/Why_Cheat_India
4 https://en.wikipedia.org/wiki/Evening_Shadows
... ...
1624 https://en.wikipedia.org/wiki/Tera_Mera_Saath_...
1625 https://en.wikipedia.org/wiki/Yeh_Zindagi_Ka_S...
1626 https://en.wikipedia.org/wiki/Sabse_Bada_Sukh
1627 https://en.wikipedia.org/wiki/Daaka
1628 https://en.wikipedia.org/wiki/Humsafar
title_y original_title
is_adult \
0 Uri: The Surgical Strike Uri: The Surgical Strike
0
1 Battalion 609 Battalion 609
0
2 The Accidental Prime Minister The Accidental Prime Minister
0
3 Why Cheat India Why Cheat India
0
4 Evening Shadows Evening Shadows
0
... ... ...
...
1624 Tera Mera Saath Rahen Tera Mera Saath Rahen
0
1625 Yeh Zindagi Ka Safar Yeh Zindagi Ka Safar
0
1626 Sabse Bada Sukh Sabse Bada Sukh
0
1627 Daaka Daaka
0
1628 Humsafar Humsafar
0
story \
0 Divided over five chapters the film chronicle...
1 The story revolves around a cricket match betw...
2 Based on the memoir by Indian policy analyst S...
3 The movie focuses on existing malpractices in ...
4 While gay rights and marriage equality has bee...
... ...
1624 Raj Dixit lives with his younger brother Rahu...
1625 Hindi pop-star Sarina Devan lives a wealthy ...
1626 Village born Lalloo re-locates to Bombay and ...
1627 Shinda tries robbing a bank so he can be wealt...
1628 Sara and Ashar are childhood friends who share...
summary tagline \
0 Indian army special forces execute a covert op... NaN
1 The story of Battalion 609 revolves around a c... NaN
2 Explores Manmohan Singh's tenure as the Prime ... NaN
3 The movie focuses on existing malpractices in ... NaN
4 Under the 'Evening Shadows' truth often plays... NaN
... ... ...
1624 A man is torn between his handicapped brother ... NaN
1625 A singer finds out she was adopted when the ed... NaN
1626 Village born Lalloo re-locates to Bombay and ... NaN
1627 Shinda tries robbing a bank so he can be wealt... NaN
1628 Ashar and Khirad are forced to get married due... NaN
actors \
0 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami Ga...
1 Vicky Ahuja|Shoaib Ibrahim|Shrikant Kamat|Elen...
2 Anupam Kher|Akshaye Khanna|Aahana Kumra|Atul S...
3 Emraan Hashmi|Shreya Dhanwanthary|Snighdadeep ...
4 Mona Ambegaonkar|Ananth Narayan Mahadevan|Deva...
... ...
1624 Ajay Devgn|Sonali Bendre|Namrata Shirodkar|Pre...
1625 Ameesha Patel|Jimmy Sheirgill|Nafisa Ali|Gulsh...
1626 Vijay Arora|Asrani|Rajni Bala|Kumud Damle|Utpa...
1627 Gippy Grewal|Zareen Khan|
1628 Fawad Khan|
wins_nominations release_date
0 4 wins 11 January 2019 (USA)
1 NaN 11 January 2019 (India)
2 NaN 11 January 2019 (USA)
3 NaN 18 January 2019 (USA)
4 17 wins & 1 nomination 11 January 2019 (India)
... ... ...
1624 NaN 7 November 2001 (India)
1625 NaN 16 November 2001 (India)
1626 NaN NaN
1627 NaN 1 November 2019 (USA)
1628 NaN TV Series (2011–2012)
ipl = pd.read_csv('ipl-matches.csv')
ipl
Team1 Team2 \
0 Rajasthan Royals Gujarat Titans
1 Royal Challengers Bangalore Rajasthan Royals
2 Royal Challengers Bangalore Lucknow Super Giants
3 Rajasthan Royals Gujarat Titans
4 Sunrisers Hyderabad Punjab Kings
.. ... ...
945 Kolkata Knight Riders Deccan Chargers
946 Mumbai Indians Royal Challengers Bangalore
947 Delhi Daredevils Rajasthan Royals
948 Kings XI Punjab Chennai Super Kings
949 Royal Challengers Bangalore Kolkata Knight Riders
Venue
TossWinner \
0 Narendra Modi Stadium, Ahmedabad Rajasthan
Royals
1 Narendra Modi Stadium, Ahmedabad Rajasthan
Royals
2 Eden Gardens, Kolkata Lucknow Super
Giants
3 Eden Gardens, Kolkata Gujarat
Titans
4 Wankhede Stadium, Mumbai Sunrisers
Hyderabad
.. ...
...
945 Eden Gardens Deccan
Chargers
946 Wankhede Stadium Mumbai
Indians
947 Feroz Shah Kotla Rajasthan
Royals
948 Punjab Cricket Association Stadium, Mohali Chennai Super
Kings
949 M Chinnaswamy Stadium Royal Challengers
Bangalore
method Player_of_Match
Team1Players \
0 NaN HH Pandya ['YBK Jaiswal', 'JC Buttler', 'SV Samson',
'D ...
1 NaN JC Buttler ['V Kohli', 'F du Plessis', 'RM Patidar',
'GJ ...
2 NaN RM Patidar ['V Kohli', 'F du Plessis', 'RM Patidar',
'GJ ...
3 NaN DA Miller ['YBK Jaiswal', 'JC Buttler', 'SV Samson',
'D ...
4 NaN Harpreet Brar ['PK Garg', 'Abhishek Sharma', 'RA
Tripathi', ...
.. ... ...
...
945 NaN DJ Hussey ['WP Saha', 'BB McCullum', 'RT Ponting',
'SC G...
946 NaN MV Boucher ['L Ronchi', 'ST Jayasuriya', 'DJ
Thornely', '...
947 NaN MF Maharoof ['G Gambhir', 'V Sehwag', 'S Dhawan', 'MK
Tiwa...
948 NaN MEK Hussey ['K Goel', 'JR Hopes', 'KC Sangakkara',
'Yuvra...
949 NaN BB McCullum ['R Dravid', 'W Jaffer', 'V Kohli', 'JH
Kallis...
Team2Players Umpire1
\
0 ['WP Saha', 'Shubman Gill', 'MS Wade', 'HH Pan... CB Gaffaney
.. ... ...
947 ['T Kohli', 'YK Pathan', 'SR Watson', 'M Kaif'... Aleem Dar
948 ['PA Patel', 'ML Hayden', 'MEK Hussey', 'MS Dh... MR Benson
949 ['SC Ganguly', 'BB McCullum', 'RT Ponting', 'D... Asad Rauf
Umpire2
0 Nitin Menon
1 Nitin Menon
2 MA Gough
3 VK Sharma
4 NA Patwardhan
.. ...
945 K Hariharan
946 DJ Harper
947 GA Pratapkumar
948 SL Shastri
949 RE Koertzen
(950, 20)
# dtypes
movies.dtypes
ipl.dtypes
ID int64
City object
Date object
Season object
MatchNumber object
Team1 object
Team2 object
Venue object
TossWinner object
TossDecision object
SuperOver object
WinningTeam object
WonBy object
Margin float64
method object
Player_of_Match object
Team1Players object
Team2Players object
Umpire1 object
Umpire2 object
dtype: object
# index
movies.index
ipl.index
# columns
movies.columns
ipl.columns
student.columns
# values
student.values
ipl.values
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
1 Battalion 609 tt9472208
poster_path \
0 https://upload.wikimedia.org/wikipedia/en/thum...
1 NaN
wiki_link \
0 https://en.wikipedia.org/wiki/Uri:_The_Surgica...
1 https://en.wikipedia.org/wiki/Battalion_609
story \
0 Divided over five chapters the film chronicle...
1 The story revolves around a cricket match betw...
summary tagline \
0 Indian army special forces execute a covert op... NaN
1 The story of Battalion 609 revolves around a c... NaN
actors wins_nominations
\
0 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami Ga... 4 wins
1 Vicky Ahuja|Shoaib Ibrahim|Shrikant Kamat|Elen... NaN
release_date
0 11 January 2019 (USA)
1 11 January 2019 (India)
ipl.tail(2)
Team1 Team2 \
948 Kings XI Punjab Chennai Super Kings
949 Royal Challengers Bangalore Kolkata Knight Riders
Venue
TossWinner \
948 Punjab Cricket Association Stadium, Mohali Chennai Super
Kings
949 M Chinnaswamy Stadium Royal Challengers
Bangalore
Player_of_Match Team1Players
\
948 MEK Hussey ['K Goel', 'JR Hopes', 'KC Sangakkara', 'Yuvra...
949 BB McCullum ['R Dravid', 'W Jaffer', 'V Kohli', 'JH Kallis...
Team2Players Umpire1
Umpire2
948 ['PA Patel', 'ML Hayden', 'MEK Hussey', 'MS Dh... MR Benson SL
Shastri
949 ['SC Ganguly', 'BB McCullum', 'RT Ponting', 'D... Asad Rauf RE
Koertzen
# sample
ipl.sample(5)
Team1 Team2 \
336 Mumbai Indians Royal Challengers Bangalore
98 Punjab Kings Sunrisers Hyderabad
890 Royal Challengers Bangalore Rajasthan Royals
157 Chennai Super Kings Rajasthan Royals
386 Kings XI Punjab Sunrisers Hyderabad
Venue \
336 Wankhede Stadium
98 Sharjah Cricket Stadium
890 Newlands
157 Sheikh Zayed Stadium
386 Punjab Cricket Association IS Bindra Stadium, ...
Team1Players \
336 ['PA Patel', 'JC Buttler', 'N Rana', 'RG Sharm...
98 ['KL Rahul', 'MA Agarwal', 'CH Gayle', 'AK Mar...
890 ['JD Ryder', 'RV Uthappa', 'LRPL Taylor', 'KP ...
157 ['SM Curran', 'F du Plessis', 'SR Watson', 'AT...
386 ['HM Amla', 'M Vijay', 'WP Saha', 'Gurkeerat S...
Team2Players
Umpire1 \
336 ['V Kohli', 'Mandeep Singh', 'TM Head', 'AB de... AK
Chaudhary
98 ['DA Warner', 'WP Saha', 'KS Williamson', 'MK ... RK
Illingworth
890 ['GC Smith', 'SA Asnodkar', 'NK Patel', 'T Hen... BR
Doctrove
157 ['BA Stokes', 'RV Uthappa', 'SV Samson', 'SPD ... CB
Gaffaney
386 ['DA Warner', 'S Dhawan', 'DJ Hooda', 'Yuvraj ... KN
Ananthapadmanabhan
Umpire2
336 CB Gaffaney
98 YC Barde
890 RB Tiffin
157 VK Sharma
386 M Erasmus
# info
movies.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1629 entries, 0 to 1628
Data columns (total 18 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 title_x 1629 non-null object
1 imdb_id 1629 non-null object
2 poster_path 1526 non-null object
3 wiki_link 1629 non-null object
4 title_y 1629 non-null object
5 original_title 1629 non-null object
6 is_adult 1629 non-null int64
7 year_of_release 1629 non-null int64
8 runtime 1629 non-null object
9 genres 1629 non-null object
10 imdb_rating 1629 non-null float64
11 imdb_votes 1629 non-null int64
12 story 1609 non-null object
13 summary 1629 non-null object
14 tagline 557 non-null object
15 actors 1624 non-null object
16 wins_nominations 707 non-null object
17 release_date 1522 non-null object
dtypes: float64(1), int64(3), object(14)
memory usage: 229.2+ KB
ipl.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 950 entries, 0 to 949
Data columns (total 20 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 ID 950 non-null int64
1 City 899 non-null object
2 Date 950 non-null object
3 Season 950 non-null object
4 MatchNumber 950 non-null object
5 Team1 950 non-null object
6 Team2 950 non-null object
7 Venue 950 non-null object
8 TossWinner 950 non-null object
9 TossDecision 950 non-null object
10 SuperOver 946 non-null object
11 WinningTeam 946 non-null object
12 WonBy 950 non-null object
13 Margin 932 non-null float64
14 method 19 non-null object
15 Player_of_Match 946 non-null object
16 Team1Players 950 non-null object
17 Team2Players 950 non-null object
18 Umpire1 950 non-null object
19 Umpire2 950 non-null object
dtypes: float64(1), int64(1), object(18)
memory usage: 148.6+ KB
# describe
movies.describe()
ipl.describe()
ID Margin
count 9.500000e+02 932.000000
mean 8.304852e+05 17.056867
std 3.375678e+05 21.633109
min 3.359820e+05 1.000000
25% 5.012612e+05 6.000000
50% 8.297380e+05 8.000000
75% 1.175372e+06 19.000000
max 1.312200e+06 146.000000
# isnull
movies.isnull().sum()
title_x 0
imdb_id 0
poster_path 103
wiki_link 0
title_y 0
original_title 0
is_adult 0
year_of_release 0
runtime 0
genres 0
imdb_rating 0
imdb_votes 0
story 20
summary 0
tagline 1072
actors 5
wins_nominations 922
release_date 107
dtype: int64
# duplicated
movies.duplicated().sum()
students.duplicated().sum()
# rename
students
iq percent lpa
0 100 80 10
1 90 70 7
2 120 100 14
3 80 50 2
4 0 0 0
5 0 0 0
students.rename(columns={'marks':'percent','package':'lpa'},inplace=Tr
ue)
Math Methods
# sum -> axis argument
students.sum(axis=0)
iq 390
percent 300
lpa 33
dtype: int64
students.mean(axis=1)
0 63.333333
1 55.666667
2 78.000000
3 44.000000
4 0.000000
5 0.000000
dtype: float64
students.var()
iq 2710.0
percent 1760.0
lpa 33.5
dtype: float64
ipl['Venue']
# multiple cols
movies[['year_of_release','actors','title_x']]
year_of_release
actors \
0 2019 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami
Ga...
1 2019 Vicky Ahuja|Shoaib Ibrahim|Shrikant Kamat|
Elen...
2 2019 Anupam Kher|Akshaye Khanna|Aahana Kumra|Atul
S...
3 2019 Emraan Hashmi|Shreya Dhanwanthary|
Snighdadeep ...
4 2018 Mona Ambegaonkar|Ananth Narayan Mahadevan|
Deva...
... ... .
..
1624 2001 Ajay Devgn|Sonali Bendre|Namrata Shirodkar|
Pre...
1625 2001 Ameesha Patel|Jimmy Sheirgill|Nafisa Ali|
Gulsh...
1626 2018 Vijay Arora|Asrani|Rajni Bala|Kumud Damle|
Utpa...
1627 2019 Gippy Grewal|Zareen
Khan|
1628 2011 Fawad
Khan|
title_x
0 Uri: The Surgical Strike
1 Battalion 609
2 The Accidental Prime Minister (film)
3 Why Cheat India
4 Evening Shadows
... ...
1624 Tera Mera Saath Rahen
1625 Yeh Zindagi Ka Safar
1626 Sabse Bada Sukh
1627 Daaka
1628 Humsafar
ipl[['Team1','Team2','WinningTeam']]
Team1 Team2 \
0 Rajasthan Royals Gujarat Titans
1 Royal Challengers Bangalore Rajasthan Royals
2 Royal Challengers Bangalore Lucknow Super Giants
3 Rajasthan Royals Gujarat Titans
4 Sunrisers Hyderabad Punjab Kings
.. ... ...
945 Kolkata Knight Riders Deccan Chargers
946 Mumbai Indians Royal Challengers Bangalore
947 Delhi Daredevils Rajasthan Royals
948 Kings XI Punjab Chennai Super Kings
949 Royal Challengers Bangalore Kolkata Knight Riders
WinningTeam
0 Gujarat Titans
1 Rajasthan Royals
2 Royal Challengers Bangalore
3 Gujarat Titans
4 Punjab Kings
.. ...
945 Kolkata Knight Riders
946 Royal Challengers Bangalore
947 Delhi Daredevils
948 Chennai Super Kings
949 Kolkata Knight Riders
# multiple row
movies.iloc[:5]
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
1 Battalion 609 tt9472208
2 The Accidental Prime Minister (film) tt6986710
3 Why Cheat India tt8108208
4 Evening Shadows tt6028796
poster_path \
0 https://upload.wikimedia.org/wikipedia/en/thum...
1 NaN
2 https://upload.wikimedia.org/wikipedia/en/thum...
3 https://upload.wikimedia.org/wikipedia/en/thum...
4 NaN
wiki_link \
0 https://en.wikipedia.org/wiki/Uri:_The_Surgica...
1 https://en.wikipedia.org/wiki/Battalion_609
2 https://en.wikipedia.org/wiki/The_Accidental_P...
3 https://en.wikipedia.org/wiki/Why_Cheat_India
4 https://en.wikipedia.org/wiki/Evening_Shadows
title_y original_title
is_adult \
0 Uri: The Surgical Strike Uri: The Surgical Strike
0
1 Battalion 609 Battalion 609
0
2 The Accidental Prime Minister The Accidental Prime Minister
0
3 Why Cheat India Why Cheat India
0
4 Evening Shadows Evening Shadows
0
story \
0 Divided over five chapters the film chronicle...
1 The story revolves around a cricket match betw...
2 Based on the memoir by Indian policy analyst S...
3 The movie focuses on existing malpractices in ...
4 While gay rights and marriage equality has bee...
summary tagline \
0 Indian army special forces execute a covert op... NaN
1 The story of Battalion 609 revolves around a c... NaN
2 Explores Manmohan Singh's tenure as the Prime ... NaN
3 The movie focuses on existing malpractices in ... NaN
4 Under the 'Evening Shadows' truth often plays... NaN
actors
wins_nominations \
0 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami Ga...
4 wins
1 Vicky Ahuja|Shoaib Ibrahim|Shrikant Kamat|Elen...
NaN
2 Anupam Kher|Akshaye Khanna|Aahana Kumra|Atul S...
NaN
3 Emraan Hashmi|Shreya Dhanwanthary|Snighdadeep ...
NaN
4 Mona Ambegaonkar|Ananth Narayan Mahadevan|Deva... 17 wins & 1
nomination
release_date
0 11 January 2019 (USA)
1 11 January 2019 (India)
2 11 January 2019 (USA)
3 18 January 2019 (USA)
4 11 January 2019 (India)
# fancy indexing
movies.iloc[[0,4,5]]
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
4 Evening Shadows tt6028796
5 Soni (film) tt6078866
poster_path \
0 https://upload.wikimedia.org/wikipedia/en/thum...
4 NaN
5 https://upload.wikimedia.org/wikipedia/en/thum...
wiki_link \
0 https://en.wikipedia.org/wiki/Uri:_The_Surgica...
4 https://en.wikipedia.org/wiki/Evening_Shadows
5 https://en.wikipedia.org/wiki/Soni_(film)
story \
0 Divided over five chapters the film chronicle...
4 While gay rights and marriage equality has bee...
5 Soni a young policewoman in Delhi and her su...
summary tagline \
0 Indian army special forces execute a covert op... NaN
4 Under the 'Evening Shadows' truth often plays... NaN
5 While fighting crimes against women in Delhi ... NaN
actors
wins_nominations \
0 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami Ga...
4 wins
4 Mona Ambegaonkar|Ananth Narayan Mahadevan|Deva... 17 wins & 1
nomination
5 Geetika Vidya Ohlyan|Saloni Batra|Vikas Shukla... 3 wins & 5
nominations
release_date
0 11 January 2019 (USA)
4 11 January 2019 (India)
5 18 January 2019 (USA)
# loc
students
iq marks package
name
nitish 100 80 10
ankit 90 70 7
rupesh 120 100 14
rishabh 80 50 2
amit 0 0 0
ankita 0 0 0
students.loc['nitish']
iq 100
marks 80
package 10
Name: nitish, dtype: int64
students.loc['nitish':'rishabh':2]
iq marks package
name
nitish 100 80 10
rupesh 120 100 14
students.loc[['nitish','ankita','rupesh']]
iq marks package
name
nitish 100 80 10
ankita 0 0 0
rupesh 120 100 14
students.iloc[[0,3,4]]
iq marks package
name
nitish 100 80 10
rishabh 80 50 2
amit 0 0 0
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
1 Battalion 609 tt9472208
2 The Accidental Prime Minister (film) tt6986710
poster_path
0 https://upload.wikimedia.org/wikipedia/en/thum...
1 NaN
2 https://upload.wikimedia.org/wikipedia/en/thum...
movies.loc[0:2,'title_x':'poster_path']
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
1 Battalion 609 tt9472208
2 The Accidental Prime Minister (film) tt6986710
poster_path
0 https://upload.wikimedia.org/wikipedia/en/thum...
1 NaN
2 https://upload.wikimedia.org/wikipedia/en/thum...
Filtering a DataFrame
ipl.head(2)
Team1 Team2 \
0 Rajasthan Royals Gujarat Titans
1 Royal Challengers Bangalore Rajasthan Royals
Team1Players \
0 ['YBK Jaiswal', 'JC Buttler', 'SV Samson', 'D ...
1 ['V Kohli', 'F du Plessis', 'RM Patidar', 'GJ ...
Team2Players Umpire1
Umpire2
0 ['WP Saha', 'Shubman Gill', 'MS Wade', 'HH Pan... CB Gaffaney
Nitin Menon
1 ['YBK Jaiswal', 'JC Buttler', 'SV Samson', 'D ... CB Gaffaney
Nitin Menon
ipl[ipl['MatchNumber'] == 'Final'][['Season','WinningTeam']]
Season WinningTeam
0 2022 Gujarat Titans
74 2021 Chennai Super Kings
134 2020/21 Mumbai Indians
194 2019 Mumbai Indians
254 2018 Chennai Super Kings
314 2017 Mumbai Indians
373 2016 Sunrisers Hyderabad
433 2015 Mumbai Indians
492 2014 Kolkata Knight Riders
552 2013 Mumbai Indians
628 2012 Kolkata Knight Riders
702 2011 Chennai Super Kings
775 2009/10 Chennai Super Kings
835 2009 Deccan Chargers
892 2007/08 Rajasthan Royals
14
51.473684210526315
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
41 Family of Thakurganj tt8897986
84 Mukkabaaz tt7180544
106 Raazi tt7098658
110 Parmanu: The Story of Pokhran tt6826438
112 Bhavesh Joshi Superhero tt6129302
169 The Ghazi Attack tt6299040
219 Raag Desh (film) tt6080746
258 Irudhi Suttru tt5310090
280 Laal Rang tt5600714
297 Udta Punjab tt4434004
354 Dangal (film) tt5074352
362 Bajrangi Bhaijaan tt3863552
365 Baby (2015 Hindi film) tt3848892
393 Detective Byomkesh Bakshy! tt3447364
449 Titli (2014 film) tt3019620
536 Haider (film) tt3390572
589 Vishwaroopam tt2199711
625 Madras Cafe tt2855648
668 Paan Singh Tomar (film) tt1620933
693 Gangs of Wasseypur tt1954470
694 Gangs of Wasseypur – Part 2 tt1954470
982 Jodhaa Akbar tt0449994
1039 1971 (2007 film) tt0983990
1058 Black Friday (2007 film) tt0400234
1188 Omkara (2006 film) tt0488414
1293 Sarkar (2005 film) tt0432047
1294 Sehar tt0477857
1361 Lakshya (film) tt0323013
1432 Gangaajal tt0373856
1495 Company (film) tt0296574
1554 The Legend of Bhagat Singh tt0319736
1607 Nayak (2001 Hindi film) tt0291376
poster_path \
0 https://upload.wikimedia.org/wikipedia/en/thum...
41 https://upload.wikimedia.org/wikipedia/en/9/99...
84 https://upload.wikimedia.org/wikipedia/en/thum...
106 https://upload.wikimedia.org/wikipedia/en/thum...
110 https://upload.wikimedia.org/wikipedia/en/thum...
112 https://upload.wikimedia.org/wikipedia/en/thum...
169 https://upload.wikimedia.org/wikipedia/en/thum...
219 https://upload.wikimedia.org/wikipedia/en/thum...
258 https://upload.wikimedia.org/wikipedia/en/f/fe...
280 NaN
297 https://upload.wikimedia.org/wikipedia/en/thum...
354 https://upload.wikimedia.org/wikipedia/en/thum...
362 https://upload.wikimedia.org/wikipedia/en/thum...
365 https://upload.wikimedia.org/wikipedia/en/thum...
393 https://upload.wikimedia.org/wikipedia/en/thum...
449 https://upload.wikimedia.org/wikipedia/en/thum...
536 https://upload.wikimedia.org/wikipedia/en/thum...
589 https://upload.wikimedia.org/wikipedia/en/thum...
625 https://upload.wikimedia.org/wikipedia/en/thum...
668 https://upload.wikimedia.org/wikipedia/en/thum...
693 https://upload.wikimedia.org/wikipedia/en/thum...
694 https://upload.wikimedia.org/wikipedia/en/thum...
982 https://upload.wikimedia.org/wikipedia/en/thum...
1039 https://upload.wikimedia.org/wikipedia/en/thum...
1058 https://upload.wikimedia.org/wikipedia/en/5/58...
1188 https://upload.wikimedia.org/wikipedia/en/thum...
1293 https://upload.wikimedia.org/wikipedia/en/thum...
1294 https://upload.wikimedia.org/wikipedia/en/thum...
1361 https://upload.wikimedia.org/wikipedia/en/thum...
1432 https://upload.wikimedia.org/wikipedia/en/thum...
1495 https://upload.wikimedia.org/wikipedia/en/thum...
1554 https://upload.wikimedia.org/wikipedia/en/thum...
1607 https://upload.wikimedia.org/wikipedia/en/thum...
wiki_link \
0 https://en.wikipedia.org/wiki/Uri:_The_Surgica...
41 https://en.wikipedia.org/wiki/Family_of_Thakur...
84 https://en.wikipedia.org/wiki/Mukkabaaz
106 https://en.wikipedia.org/wiki/Raazi
110 https://en.wikipedia.org/wiki/Parmanu:_The_Sto...
112 https://en.wikipedia.org/wiki/Bhavesh_Joshi_Su...
169 https://en.wikipedia.org/wiki/The_Ghazi_Attack...
219 https://en.wikipedia.org/wiki/Raagdesh
258 https://en.wikipedia.org/wiki/Saala_Khadoos
280 https://en.wikipedia.org/wiki/Laal_Rang
297 https://en.wikipedia.org/wiki/Udta_Punjab
354 https://en.wikipedia.org/wiki/Dangal_(film)
362 https://en.wikipedia.org/wiki/Bajrangi_Bhaijaan
365 https://en.wikipedia.org/wiki/Baby_(2015_Hindi...
393 https://en.wikipedia.org/wiki/Detective_Byomke...
449 https://en.wikipedia.org/wiki/Titli_(2014_film)
536 https://en.wikipedia.org/wiki/Haider_(film)
589 https://en.wikipedia.org/wiki/Vishwaroop_(Hind...
625 https://en.wikipedia.org/wiki/Madras_Cafe
668 https://en.wikipedia.org/wiki/Paan_Singh_Tomar...
693 https://en.wikipedia.org/wiki/Gangs_of_Wasseypur
694 https://en.wikipedia.org/wiki/Gangs_of_Wasseyp...
982 https://en.wikipedia.org/wiki/Jodhaa_Akbar
1039 https://en.wikipedia.org/wiki/1971_(2007_film)
1058 https://en.wikipedia.org/wiki/Black_Friday_(20...
1188 https://en.wikipedia.org/wiki/Omkara_(2006_film)
1293 https://en.wikipedia.org/wiki/Sarkar_(2005_film)
1294 https://en.wikipedia.org/wiki/Sehar
1361 https://en.wikipedia.org/wiki/Lakshya_(film)
1432 https://en.wikipedia.org/wiki/Gangaajal
1495 https://en.wikipedia.org/wiki/Company_(film)
1554 https://en.wikipedia.org/wiki/The_Legend_of_Bh...
1607 https://en.wikipedia.org/wiki/Nayak_(2001_Hind...
title_y original_title
is_adult \
0 Uri: The Surgical Strike Uri: The Surgical Strike
0
41 Family of Thakurganj Family of Thakurganj
0
84 The Brawler Mukkabaaz
0
106 Raazi Raazi
0
110 Parmanu: The Story of Pokhran Parmanu: The Story of Pokhran
0
112 Bhavesh Joshi Superhero Bhavesh Joshi Superhero
0
169 The Ghazi Attack The Ghazi Attack
0
219 Raag Desh Raag Desh
0
258 Saala Khadoos Saala Khadoos
0
280 Laal Rang Laal Rang
0
297 Udta Punjab Udta Punjab
0
354 Dangal Dangal
0
362 Bajrangi Bhaijaan Bajrangi Bhaijaan
0
365 Baby Baby
0
393 Detective Byomkesh Bakshy! Detective Byomkesh Bakshy!
0
449 Titli Titli
0
536 Haider Haider
0
589 Vishwaroopam Vishwaroopam
0
625 Madras Cafe Madras Cafe
0
668 Paan Singh Tomar Paan Singh Tomar
0
693 Gangs of Wasseypur Gangs of Wasseypur
0
694 Gangs of Wasseypur Gangs of Wasseypur
0
982 Jodhaa Akbar Jodhaa Akbar
0
1039 1971 1971
0
1058 Black Friday Black Friday
0
1188 Omkara Omkara
0
1293 Sarkar Sarkar
0
1294 Sehar Sehar
0
1361 Lakshya Lakshya
0
1432 Gangaajal Gangaajal
0
1495 Company Company
0
1554 The Legend of Bhagat Singh The Legend of Bhagat Singh
0
1607 Nayak: The Real Hero Nayak: The Real Hero
0
imdb_votes story \
0 35112 Divided over five chapters the film chronicle...
41 895 The film is based on small town of North India...
84 5434 A boxer (Shravan) belonging to upper cast tra...
106 20289 Hidayat Khan is the son of an Indian freedom f...
110 18292 Captain Ashwat Raina's efforts to turn India i...
112 4928 Bhavesh Joshi Superhero is an action film abou...
169 10332 In 1971 amid rising tensions between India an...
219 341 A period film based on the historic 1945 India...
258 10507 An under-fire boxing coach Prabhu is transfer...
280 3741 The friendship of two men is tested when thing...
297 23995 What on earth can a rock star a migrant labor...
354 131338 Biopic of Mahavir Singh Phogat who taught wre...
362 65877 A little mute girl from a Pakistani village ge...
365 49426 The country is perpetually under threat from t...
393 14674 CALCUTTA 1943 A WAR - A MYSTERY - and A DETECT...
449 3677 In the badlands of Delhi's dystopic underbelly...
536 46912 Vishal Bhardwaj's adaptation of William Shakes...
589 38016 Vishwanathan a Kathak dance teacher in New Yo...
625 21393 An Indian Intelligence agent (portrayed by Joh...
668 29994 Paan Singh Tomar is a Hindi-language film bas...
693 71636 Shahid Khan is exiled after impersonating the ...
694 71636 Shahid Khan is exiled after impersonating the ...
982 27541 Jodhaa Akbar is a sixteenth century love story...
1039 1121 Based on true facts the film revolves around ...
1058 16761 A dramatic presentation of the bomb blasts tha...
1188 17594 Advocate Raghunath Mishra has arranged the mar...
1293 14694 Meet Subhash Nagre - a wealthy and influential...
1294 1861 At the tender age of 8 Ajay Kumar is traumatiz...
1361 18777 Karan is a lazy good-for-nothing who lives on ...
1432 14295 An SP Amit Kumar who is given charge of Tezpur...
1495 13474 Mallik is a henchman of Aslam Bhai a Mumbai u...
1554 13455 Bhagat was born in British India during the ye...
1607 12522 Employed as a camera-man at a popular televisi...
summary \
0 Indian army special forces execute a covert op...
41 The film is based on small town of North India...
84 A boxer struggles to make his mark in the boxi...
106 A Kashmiri woman agrees to marry a Pakistani a...
110 Ashwat Raina and his teammates arrive in Pokhr...
112 The origin story of Bhavesh Joshi an Indian s...
169 A Pakistani submarine Ghazi plans to secretly...
219 A period film based on the historic 1945 India...
258 The story of a former boxer who quits boxing f...
280 The friendship of two men is tested when thing...
297 A story that revolves around drug abuse in the...
354 Former wrestler Mahavir Singh Phogat and his t...
362 An Indian man with a magnanimous heart takes a...
365 An elite counter-intelligence unit learns of a...
393 While investigating the disappearance of a che...
449 A Hindi feature film set in the lower depths o...
536 A young man returns to Kashmir after his fathe...
589 When a classical dancer's suspecting wife sets...
625 An Indian intelligence agent journeys to a war...
668 The story of Paan Singh Tomar an Indian athle...
693 A clash between Sultan and Shahid Khan leads t...
694 A clash between Sultan and Shahid Khan leads t...
982 A sixteenth century love story about a marriag...
1039 Based on true facts the film revolves around ...
1058 Black Friday is a film about the investigation...
1188 A politically-minded enforcer's misguided trus...
1293 The authority of a man who runs a parallel go...
1294 Ajay Kumar the newly appointed honest SSP of ...
1361 An aimless jobless irresponsible grown man j...
1432 An IPS officer motivates and leads a dysfuncti...
1495 A small-time gangster named Chandu teams up wi...
1554 The story of a young revolutionary who raised ...
1607 A man accepts a challenge by the chief ministe...
tagline \
0 NaN
41 NaN
84 NaN
106 An incredible true story
110 1998| India: one secret operation| six Indians...
112 This year| justice will have a new name.
169 The war you did not know about
219 NaN
258 NaN
280 Every job good or bad| must be done with honesty.
297 NaN
354 You think our girls are any lesser than boys?
362 NaN
365 History Is Made By Those Who Give A Damn!
393 Expect The Unexpected
449 Daring| Desireable| Dangerous
536 NaN
589 NaN
625 NaN
668 NaN
693 NaN
694 NaN
982 NaN
1039 Honor the heroes.......
1058 The story of the Bombay bomb blasts
1188 NaN
1293 'There are no Rights and Wrongs. Only Power' -...
1294 NaN
1361 It took him 24 years and 18000 feet to find hi...
1432 NaN
1495 A law & order enterprise
1554 NaN
1607 Fight the power
actors \
0 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami Ga...
41 Jimmy Sheirgill|Mahie Gill|Nandish Singh|Prana...
84 Viineet Kumar|Jimmy Sheirgill|Zoya Hussain|Rav...
106 Alia Bhatt|Vicky Kaushal|Rajit Kapoor|Shishir ...
110 John Abraham|Boman Irani|Diana Penty|Anuja Sat...
112 Harshvardhan Kapoor|Priyanshu Painyuli|Ashish ...
169 Rana Daggubati|Kay Kay Menon|Atul Kulkarni|Om ...
219 Kunal Kapoor|Amit Sadh|Mohit Marwah|Kenneth De...
258 Madhavan|Ritika Singh|Mumtaz Sorcar|Nassar|Rad...
280 Randeep Hooda|Akshay Oberoi|Rajniesh Duggall|P...
297 Shahid Kapoor|Alia Bhatt|Kareena Kapoor|Diljit...
354 Aamir Khan|Fatima Sana Shaikh|Sanya Malhotra|S...
362 Salman Khan|Harshaali Malhotra|Nawazuddin Sidd...
365 Akshay Kumar|Danny Denzongpa|Rana Daggubati|Ta...
393 Sushant Singh Rajput|Anand Tiwari|Neeraj Kabi|...
449 Nawazuddin Siddiqui|Niharika Singh|Anil George...
536 Tabu|Shahid Kapoor|Shraddha Kapoor|Kay Kay Men...
589 Kamal Haasan|Rahul Bose|Shekhar Kapur|Pooja Ku...
625 John Abraham|Nargis Fakhri|Raashi Khanna|Praka...
668 Irrfan Khan|
693 Manoj Bajpayee|Richa Chadha|Nawazuddin Siddiqu...
694 Manoj Bajpayee|Richa Chadha|Nawazuddin Siddiqu...
982 Hrithik Roshan|Aishwarya Rai Bachchan|Sonu Soo...
1039 Manoj Bajpayee|Ravi Kishan|Deepak Dobriyal|
1058 Kay Kay Menon|Pavan Malhotra|Aditya Srivastava...
1188 Ajay Devgn|Saif Ali Khan|Vivek Oberoi|Kareena ...
1293 Amitabh Bachchan|Abhishek Bachchan|Kay Kay Men...
1294 Arshad Warsi|Pankaj Kapur|Mahima Chaudhry|Sush...
1361 Hrithik Roshan|Preity Zinta|Amitabh Bachchan|O...
1432 Ajay Devgn|Gracy Singh|Mohan Joshi|Yashpal Sha...
1495 Ajay Devgn|Mohanlal|Manisha Koirala|Seema Bisw...
1554 Ajay Devgn|Sushant Singh|D. Santosh|Akhilendra...
1607 Anil Kapoor|Rani Mukerji|Amrish Puri|Johnny Le...
wins_nominations release_date
0 4 wins 11 January 2019 (USA)
41 NaN 19 July 2019 (India)
84 3 wins & 6 nominations 12 January 2018 (USA)
106 21 wins & 26 nominations 11 May 2018 (USA)
110 NaN 25 May 2018 (USA)
112 2 nominations 1 June 2018 (USA)
169 1 win & 7 nominations 17 February 2017 (USA)
219 NaN 28 July 2017 (India)
258 9 wins & 2 nominations 29 January 2016 (USA)
280 NaN 22 April 2016 (India)
297 11 wins & 19 nominations 17 June 2016 (USA)
354 23 wins & 4 nominations 21 December 2016 (USA)
362 25 wins & 13 nominations 17 July 2015 (USA)
365 1 win 23 January 2015 (India)
393 NaN 3 April 2015 (USA)
449 4 wins & 5 nominations 20 June 2014 (USA)
536 28 wins & 24 nominations 2 October 2014 (USA)
589 5 wins & 11 nominations 25 January 2013 (India)
625 10 wins & 10 nominations 23 August 2013 (India)
668 10 wins & 11 nominations 2 March 2012 (USA)
693 12 wins & 43 nominations 2 August 2012 (Singapore)
694 12 wins & 43 nominations 2 August 2012 (Singapore)
982 32 wins & 21 nominations 15 February 2008 (USA)
1039 1 win 9 March 2007 (India)
1058 3 nominations 9 February 2007 (India)
1188 19 wins & 20 nominations 28 July 2006 (USA)
1293 2 wins & 10 nominations 1 July 2005 (India)
1294 NaN 29 July 2005 (India)
1361 4 wins & 10 nominations 18 June 2004 (USA)
1432 4 wins & 29 nominations 29 August 2003 (India)
1495 16 wins & 9 nominations 15 April 2002 (India)
1554 11 wins & 5 nominations 7 June 2002 (India)
1607 2 nominations 7 September 2001 (India)
# write a function that can return the track record of 2 teams against
each other
title_x imdb_id \
0 Uri: The Surgical Strike tt8291224
1 Battalion 609 tt9472208
2 The Accidental Prime Minister (film) tt6986710
3 Why Cheat India tt8108208
4 Evening Shadows tt6028796
poster_path \
0 https://upload.wikimedia.org/wikipedia/en/thum...
1 NaN
2 https://upload.wikimedia.org/wikipedia/en/thum...
3 https://upload.wikimedia.org/wikipedia/en/thum...
4 NaN
wiki_link \
0 https://en.wikipedia.org/wiki/Uri:_The_Surgica...
1 https://en.wikipedia.org/wiki/Battalion_609
2 https://en.wikipedia.org/wiki/The_Accidental_P...
3 https://en.wikipedia.org/wiki/Why_Cheat_India
4 https://en.wikipedia.org/wiki/Evening_Shadows
title_y original_title
is_adult \
0 Uri: The Surgical Strike Uri: The Surgical Strike
0
1 Battalion 609 Battalion 609
0
2 The Accidental Prime Minister The Accidental Prime Minister
0
3 Why Cheat India Why Cheat India
0
4 Evening Shadows Evening Shadows
0
story \
0 Divided over five chapters the film chronicle...
1 The story revolves around a cricket match betw...
2 Based on the memoir by Indian policy analyst S...
3 The movie focuses on existing malpractices in ...
4 While gay rights and marriage equality has bee...
summary tagline \
0 Indian army special forces execute a covert op... NaN
1 The story of Battalion 609 revolves around a c... NaN
2 Explores Manmohan Singh's tenure as the Prime ... NaN
3 The movie focuses on existing malpractices in ... NaN
4 Under the 'Evening Shadows' truth often plays... NaN
actors
wins_nominations \
0 Vicky Kaushal|Paresh Rawal|Mohit Raina|Yami Ga...
4 wins
1 Vicky Ahuja|Shoaib Ibrahim|Shrikant Kamat|Elen...
NaN
2 Anupam Kher|Akshaye Khanna|Aahana Kumra|Atul S...
NaN
3 Emraan Hashmi|Shreya Dhanwanthary|Snighdadeep ...
NaN
4 Mona Ambegaonkar|Ananth Narayan Mahadevan|Deva... 17 wins & 1
nomination
release_date Country
0 11 January 2019 (USA) India
1 11 January 2019 (India) India
2 11 January 2019 (USA) India
3 18 January 2019 (USA) India
4 11 January 2019 (India) India
title_x imdb_id \
11 Gully Boy tt2395469
34 Yeh Hai India tt5525846
37 Article 15 (film) tt10324144
87 Aiyaary tt6774212
96 Raid (2018 film) tt7363076
poster_path \
11 https://upload.wikimedia.org/wikipedia/en/thum...
34 https://upload.wikimedia.org/wikipedia/en/thum...
37 https://upload.wikimedia.org/wikipedia/en/thum...
87 https://upload.wikimedia.org/wikipedia/en/thum...
96 https://upload.wikimedia.org/wikipedia/en/thum...
wiki_link title_y \
11 https://en.wikipedia.org/wiki/Gully_Boy Gully Boy
34 https://en.wikipedia.org/wiki/Yeh_Hai_India Yeh Hai India
37 https://en.wikipedia.org/wiki/Article_15_(film) Article 15
87 https://en.wikipedia.org/wiki/Aiyaary Aiyaary
96 https://en.wikipedia.org/wiki/Raid_(2018_film) Raid
imdb_rating imdb_votes \
11 8.2 22440
34 5.7 169
37 8.3 13417
87 5.2 3538
96 7.4 13159
story \
11 Gully Boy is a film about a 22-year-old boy "M...
34 Yeh Hai India follows the story of a 25 years...
37 In the rural heartlands of India an upright p...
87 General Gurinder Singh comes with a proposal t...
96 Set in the 80s in Uttar Pradesh India Raid i...
summary \
11 A coming-of-age story based on the lives of st...
34 Yeh Hai India follows the story of a 25 years...
37 In the rural heartlands of India an upright p...
87 After finding out about an illegal arms deal ...
96 A fearless income tax officer raids the mansio...
tagline \
11 Apna Time Aayega!
34 A Film for Every Indian
37 Farq Bahut Kar Liya| Ab Farq Laayenge.
87 The Ultimate Trickery
96 Heroes don't always come in uniform
actors
wins_nominations \
11 Ranveer Singh|Alia Bhatt|Siddhant Chaturvedi|V... 6 wins & 3
nominations
34 Gavie Chahal|Mohan Agashe|Mohan Joshi|Lom Harsh| 2 wins & 1
nomination
37 Ayushmann Khurrana|Nassar|Manoj Pahwa|Kumud Mi...
1 win
87 Sidharth Malhotra|Manoj Bajpayee|Rakul Preet S... 1
nomination
96 Ajay Devgn|Saurabh Shukla|Ileana D'Cruz|Amit S... 2 wins & 3
nominations
movies.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 298 entries, 11 to 1623
Data columns (total 19 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 title_x 298 non-null object
1 imdb_id 298 non-null object
2 poster_path 298 non-null object
3 wiki_link 298 non-null object
4 title_y 298 non-null object
5 original_title 298 non-null object
6 is_adult 298 non-null int64
7 year_of_release 298 non-null int64
8 runtime 298 non-null object
9 genres 298 non-null object
10 imdb_rating 298 non-null float64
11 imdb_votes 298 non-null int64
12 story 298 non-null object
13 summary 298 non-null object
14 tagline 298 non-null object
15 actors 298 non-null object
16 wins_nominations 298 non-null object
17 release_date 298 non-null object
18 Country 298 non-null object
dtypes: float64(1), int64(3), object(15)
memory usage: 46.6+ KB
ipl['ID'] = ipl['ID'].astype('int32')
ipl.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 950 entries, 0 to 949
Data columns (total 20 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 ID 950 non-null int32
1 City 899 non-null object
2 Date 950 non-null object
3 Season 950 non-null object
4 MatchNumber 950 non-null object
5 Team1 950 non-null object
6 Team2 950 non-null object
7 Venue 950 non-null object
8 TossWinner 950 non-null object
9 TossDecision 950 non-null object
10 SuperOver 946 non-null object
11 WinningTeam 946 non-null object
12 WonBy 950 non-null object
13 Margin 932 non-null float64
14 method 19 non-null object
15 Player_of_Match 946 non-null object
16 Team1Players 950 non-null object
17 Team2Players 950 non-null object
18 Umpire1 950 non-null object
19 Umpire2 950 non-null object
dtypes: float64(1), int32(1), object(18)
memory usage: 144.9+ KB
# ipl['Season'] = ipl['Season'].astype('category')
ipl['Team1'] = ipl['Team1'].astype('category')
ipl['Team2'] = ipl['Team2'].astype('category')
ipl.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 950 entries, 0 to 949
Data columns (total 20 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 ID 950 non-null int32
1 City 899 non-null object
2 Date 950 non-null object
3 Season 950 non-null category
4 MatchNumber 950 non-null object
5 Team1 950 non-null category
6 Team2 950 non-null category
7 Venue 950 non-null object
8 TossWinner 950 non-null object
9 TossDecision 950 non-null object
10 SuperOver 946 non-null object
11 WinningTeam 946 non-null object
12 WonBy 950 non-null object
13 Margin 932 non-null float64
14 method 19 non-null object
15 Player_of_Match 946 non-null object
16 Team1Players 950 non-null object
17 Team2Players 950 non-null object
18 Umpire1 950 non-null object
19 Umpire2 950 non-null object
dtypes: category(3), float64(1), int32(1), object(15)
memory usage: 127.4+ KB
# value_counts
# find which player has won most potm -> in finals and qualifiers
# sort_values -> ascending -> na_position -> inplace -> multiple cols