#import data set
text = open("Data.txt","r").read()
#making list of lines as documents
documents = []
for r in text.split('\n'):
documents.append( r )
documents
['#End of Innings ##', '19.6', 'Chawla to Miller, no run, short ball, Miller cuts but finds the man at cover, KKR win by 28 runs', '19.5', 'Chawla to Miller, 2 runs, short and spinning away outside off stump, Miller cuts it to deep point', '19.4', 'Chawla to Mandeep, 1 run, quicker delivery on the stumps, Mandeep flicks it to long-on', '19.3', 'Chawla to Mandeep, FOUR, Chawla is only going to bowl googlies, so Mandeep moves across and scoops the ball over Lynn at short fine leg', '19.2', 'Chawla to Mandeep, 2 runs, googly again, Mandeep works it to mid-wicket and returns for the second', '19.1', 'Chawla to Mandeep, four, short googly, pulled away to deep mid-wicket, Uthappa runs to his right, gets to the ball but fumbles as he tries to hop and stop the ball', '', 'Piyush Chawla [2.0-0-13-1] is back into the attack', 'Six legitimate deliveries is all KKR want', '19', '', '18.6', 'Ferguson to Miller, no run, slower delivery, beaten and Miller grunts', '18.5', 'Ferguson to Miller, SIX, now then, KXIP need seven more of these. But hey, this bloke has backed away to this full ball and somehow sliced this ball over backward point, normally you see the ball travel over cover, incredible hit', '18.4', 'Ferguson to Miller, 2 runs, slower delivery on the leg stump, tucked away towards mid-wicket, easy two. Fifty up for Miller, but no celebrations', '18.3', 'Ferguson to Mandeep, 1 run, very full and outside off stump, Mandeep drills it hard, Ferguson gets a hand on it and the ball rolls towards mid-off', '18.2', "Ferguson to Mandeep, four, short delivery outside off stump, Mandeep stays back and cuts past backward point, third man doesn't have a real go. Fours won't do it for KXIP", '18.1', "Ferguson to Miller, 1 run, oh brilliant yorker targetting Miller's boots, dug out into the on-side, looks like that ball jammed the foot off the bat", 'Most sixes in an IPL match at the Eden Gardens', '23* - tonight - KKR (17) and KXIP (6*)', '20 - 16 Apr 2018 - KKR (25) and DD (5)', '18.1', 'Ferguson to Miller, wide, Ferguson begins with a wide down the leg-side', '57 needed off 12. KKR have this in the bag', '18', '', '17.6', 'Prasidh to Mandeep, FOUR, clever hit, short delivery rising steeply, Mandeep stays leg side of the ball and guides it over Karthik for a much needed boundary', '17.5', "Prasidh to Miller, 1 run, this is a short delivery that rushed onto Miller, the ball takes the splice of the bat and lands safely at mid-wicket, Kuldeep didn't go for the catch, Dre Russ wanted him to sprint and attack the ball. Well, maybe Kuldeep has the World Cup on his mind. Wouldn't want to dive and injure attempting a catch", '17.4', 'Prasidh to Miller, no run, Miller will be kicking himself for missing out on this flick, would have normally put that over deep mid-wicket, the ball lobbed off the pad', 'Derick says: @Hemant... You mean Russell mode?', '17.3', "Prasidh to Miller, FOUR, low full toss, drilled hard between the sticks and the non-striker, Dre Russ can't cut it off running from long-off", '17.2', 'Prasidh to Mandeep, 1 run, full toss and Mandeep has only hit it straight to extra-cover, too much bottom hand there looking to power the ball, just needed to time it', '17.1', 'Prasidh to Mandeep, no run, slower delivery on the shorter side, Mandeep plays the pull early and misses', 'Prasidh Krishna [3.0-0-32-0] is back into the attack', 'Hemant says: Mr. Miller needs to turn carnival mode on. -- " You mean festival of fours and sixes right?"', '17', 'Miller , Chawla , Kuldeep', '16.6', "Ferguson to Mandeep, 1 run, oh this looked funny! Mandeep was attempting the pull shot through mid-wicket, ended up slicing it hard through point because of Ferguson's extra pace", '16.5', 'Ferguson to Mandeep, 2 runs, friendly full toss, but Mandeep has mistimed this drive, chips it over to deep cover', '16.4', 'Ferguson to Miller, 1 run, short slower delivery, Miller swivels and helps it to short fine leg', '16.3', 'Ferguson to Miller, four, this is class batting, knows third man is inside the ring, as soon as Ferguson dropped the slower ball short, Miller was there to just guide in the gap wide of backward point', 'Miller will love pace on the ball from Ferguson, who is going to bowl round the wicket.', '16.2', 'Ferguson to Mandeep, 1 run, lovely timing again from Mandeep again, this time he slices this along the ground to deep cover-point', '16.1', 'Ferguson to Mandeep, Six, this is a lovely lofted off-drive, nothing better than this sort of a shot to get going. Length ball, nice pitch to bat on, so Mandeep hit through the line and collected a maximum', 'Lockie Ferguson [2.0-0-12-1] is back into the attack', '16', '', '15.6', 'Chawla to Miller, no run, this is a very wide short ball, Miller tried to fetch the pull shot, missed, the ball sneaked under the under edge, Karthik was confident in his appeal, given out and Miller overturned the call by reviewing', "Miller given out caught behind, but he's reviewed it. Nothing on Snicko! NOT OUT.", '15.5', 'Chawla to Mandeep, 1 run, googly down the leg-side, Mandeep glances it to short fine leg', '15.4', 'Chawla to Miller, 1 run, Miller moves across knowing Chawla will only bowl wide outside off stump, tried to power this over long-on, but toe-ended it along the ground in the end', '15.3', "Chawla to Mandeep, 1 run, wrong 'un down the leg-side, Mandeep flicks it to backward square leg", 'Mandeep Singh, right handed bat, comes to the crease', '15.2', 'Chawla to Agarwal, out Bowled!! The googly and it takes out the leg stump. Agarwal on one knee to slog-sweep it for six, but missed the ball completely and lost the pole. A fine fifty from Agarwal, but KXIP needed him to push a little more hard chasing 219. Agarwal b Chawla 58(34) [4s-6 6s-1]', "Chawla to Agarwal, THAT'S OUT!! Bowled!!", '15.1', 'Chawla to Miller, 1 run, shortish delivery outside off stump, punched to deep cover', 'Piyush Chawla [1.0-0-9-0] is back into the attack', "Here's a stat nugget from the legendary statguru Mohandas Menon", '', "Mayank Agarwal's last IPL fifty came on 1 May 2015 - 52* for DD v KXIP at Delhi - 21 innings ago! ", 'He now has four IPL 50s in 66 matches and 61 innings', 'Time-out time. A good partnership but Mayank has got to go really hard with Miller at the other end. 86 needed off 30 balls. Achievable, but will take some doing!', '15', 'Runs Scored: 9', '0 1 2 1 4 1', 'Score after 15 overs', 'KXIP 133-3', 'Miller 36(26)', 'Agarwal 58(33)', 'Kuldeep Yadav', '4-0-32-0', '14.6', 'Kuldeep Yadav to Miller, 1 run, spinning away outside off stump, Miller stays back and pushes it towards extra-cover', '14.5', 'Kuldeep Yadav to Miller, 4, down the track to drill this hard wide of short cover, Dre Russ slides and stops the ball, but was his back foot in touch with the rope when he was in contact with the ball? Third umpire checks, four it is', 'Mani Chikkam says: "A delight to watch M&M Show"', '14.4', 'Kuldeep Yadav to Agarwal, 1 run, punched away to long-on', '14.3', "Kuldeep Yadav to Agarwal, 2 runs, in the airrr, dropped, Rinku Singh the sub! Flighted delivery outside off stump, Agarwal steps out and reaches out to this widish delivery, sliced it, Rinku ran to his left and dived full length forward but it didn't stick", '14.2', 'Kuldeep Yadav to Miller, 1 run, swept away uppishly to deep mid-wicket', '14.1', 'Kuldeep Yadav to Miller, no run, Miller moved across to target mid-wicket, but Kuldeep Yadav fired it flat and straight, forcing Miller to defend it back to the bowler', 'Kuldeep Yadav [3.0-0-23-0] is back into the attack', '14', '', '13.6', "A Russell to Agarwal, 2 runs, very full, dug out literally and it rockets past Russell, long-off cuts it off and it's another two. It was an over for couples", '13.5', "A Russell to Agarwal, no run, slower ball bouncer, Agarwal didn't have the pace to ramp this ball, missed it completely, may not have gone to the fence even if he had made decent contact", '13.4', 'A Russell to Agarwal, 2 runs, another soft nudge to the right deep mid-wicket this time for a couple of runs', '13.3', "A Russell to Agarwal, 2 runs, flicked wide of long-on, two is call and he's home. Fifty for Agarwal, his 4th in IPL, good length delivery on the stumps, Agarwal hits the gap nicely on that occasion", '13.2', 'A Russell to Agarwal, no run, short and rising, Agarwal stayed leg-side of the ball and tried to guide that away towards third man, missed', '13.1', 'A Russell to Agarwal, 2 runs, nice slower delivery outside off stump, Mayank flicks through the vacant mid-wicket region, scampers back for the second', 'Andre Russell [2.0-0-13-2] is back into the attack', '13', '', 'Chawla', '1-0-9-0', '12.6', 'Chawla to Miller, 2 runs, short ball, the googly again, Miller pulls to deep mid-wicket, fumble from Kuldeep and Agarwal calls for the second run, gets home easily', '12.5', 'Chawla to Miller, no run, shortish and outside off stump, Miller mistimes the cut towards cover', '12.4', 'Chawla to Miller, no run, pushed into the off-side', '12.3', 'Chawla to Agarwal, leg byes, 1 run, quicker googly, the ball rolls behind square off the pad, missing leg', '12.2', "Chawla to Agarwal, Six, oh these bats, modern day cricket, power, so cruel for the bowler. Quickish delivery on the leg stump, Agarwal was caught between a sweep shot and a pull shot, but he's somehow sweetly muscled this to clear backward square leg", '12.1', 'Chawla to Miller, 1 run, googly that keeps a touch low, Miller cuts it to deep point', 'Piyush Chawla, right-arm leg break, comes into the attack', '29 off the last 2 overs', '12', '', 'Agarwal 41(23)', '', '11.6', 'Narine to Agarwal, FOUR, and cheeky! Waits on it and opens the face of the blade to glide it away to deep third man for a four', '11.5', 'Narine to Agarwal, FOUR, slapped! That was powered down the ground. Not too far from the bowler, not too far from the sticks and the ball escaped into the fence', '11.4', "Narine to Miller, 1 run, tucks the ball away into the on-side and calls of 'two' were made but they settle for a single", '11.3', 'Narine to Miller, four, smashes the ball away again. Shortish ball and has been pulled away past deep mid for a four', '11.2', "Narine to Miller, SIX, too full, the leverage was there and he has muscled it over the bowler's head for a towering sixer. Massive hit from Killer Miller", '11.1', 'Narine to Miller, no run, the offie, turning away, misses as he tries to drive it', 'Girish Wadhwa says: "KXIP has the whole game on Miller\'s shoulders." - Two words: \'Batting Depth\'', '11', ')', 'Kuldeep Yadav', '3-0-23-0', '10.6', 'Kuldeep Yadav to Miller, 1 run, dropped chance? Or runs saved? Lockie Ferguson at deep backward square popped the ball up trying to catch it and then flicked the ball back into the playing area while his body toppled over the cushion. But he did well to stop it. The fence was on his mind and hence he dropped it thinking he will trip over. That was flighted and Miller again had picked up the slog sweep option to disperse the ball away', '10.5', 'Kuldeep Yadav to Miller, 6, and the sweep gets him out of jail. Emphatically. Knelt down and smacked it. The bat made a massive noise as it met the ball. The ball whistled over deep mid', '10.4', 'Kuldeep Yadav to Miller, no run, lucky! Slower delivery at 76kph and Miller was through with his cut shot too early. Gets a big inside edge which misses the sticks by a few inches', '10.3', 'Kuldeep Yadav to Agarwal, 1 run, spins in and has been tucked off the pads for a single to deep mid', '10.3', 'Kuldeep Yadav to Agarwal, wide, helium on that delivery as it was floated up too much. But was dished out too wide. Wided', '10.2', 'Kuldeep Yadav to Miller, 1 run, too full, on the pads, unsweepable length ( trying to lexicograph), clipped to deep mid for a single', '10.1', 'Kuldeep Yadav to Miller, no run, fuller and pushed back to the bowler off the full face of the bat', 'Cricbuzz Comm Box- Match 6, Kolkata v Punjab, 2nd inn, Over No.10', '', 'Cricbuzz Comm Box- Match 6, Kolkata v Punjab, 2nd inn, Over No.10', 'TweetShareCopy URL', '10', '', 'Score after 10 overs', 'KXIP 77-3', 'Agarwal 32(20)', 'Miller 8(9)', '', '9.6', 'Narine to Agarwal, FOUR, a whippy sweep-type-clip off the pads as it was too full for Agarwal to abort his attempted sweep. So, he bent a little and whipped it away past the dive of the deep square leg fielder for a four. The rate required is now 14.2', '9.5', 'Narine to Miller, 1 run, flatter delivery and has been powered away flat on to the on-side for a single to deep mid', '9.4', 'Narine to Agarwal, 1 run, the offie again, dips in and has been tucked down to long-on for a single', 'DK rings a few quick changes in the field.', '9.3', 'Narine to Miller, 1 run, enough of the off-side play. Drags the ball away into the on-side. Courtesy - a sweep', '9.2', 'Narine to Miller, no run, loopy, slightly shortish, grips a bit and Miller misses the cut', '9.1', 'Narine to Miller, no run, starts with an offie in his 100th IPL game. Miller jabs at it and misses', 'Sunil Narine, right-arm off break, comes into the attack', "Time-out. A no-ball for three men inside the circle. An overthrow picked up late. Events and KXIP have tied the knot this year. But this ceremony today hasn't been a smooth one. Three down for 70 at almost the half-way mark while chasing 200 plus isn't an ideal case. But the adage -- if it's in the arc, it's out of the park still lives on with Miller still being there. Can him and Agarwal turn it around? Here is Narine into the attack after the break.", 'Smit Chhadva says: "KXIP teaching us all the rules this season. Mankading, fielders limitation outside circle and now overthrow if ball is not dead."', '9', 'Total score: ', 'Kuldeep Yadav', '2-0-13-0', '8.6', 'Kuldeep Yadav to Miller, 1 run, charges out, drives the ball down to long-on and gets a single', '8.5', 'Kuldeep Yadav to Miller, FOUR, when in doubt, sweep! Did so of late against Lanka in the T20Is and now also repeating the same. Knelt down and swept it in front of square for a four', '8.4', 'Kuldeep Yadav to Miller, no run, another googly and has been misread. Off the inner half of the bat to short mid', '8.3', 'Kuldeep Yadav to Agarwal, 1 run, shortish delivery and has been chopped out to deep cover for a single', '8.3', 'Kuldeep Yadav to Agarwal, wide, too wide. Spills the googly too wide outside off and was wided as Agarwal left it alone', '8.2', 'Kuldeep Yadav to Miller, 1 run, tossed up delivery and has been driven down to long-off for a single. The required rate now is closing in on 14', '8.1', 'Kuldeep Yadav to Agarwal, 1 run, shortish delivery outside off and has been chopped down to deep cover for a single', '8', 'Runs Scored: 6', '1 4 W 0 1 0', '', '7.6', 'A Russell to Miller, no run, on the pads, on a length and Miller misses the tuck', '7.5', 'A Russell to Agarwal, 1 run, tucked off the pads, short fine leg picks it up. Single taken', '7.4', "A Russell to Agarwal, no run, bangs the short ball in, Agarwal ducks down to stay away from harm's way", 'David Miller, left handed bat, comes to the crease', '7.3', 'A Russell to Sarfaraz Khan, out Caught by Karthik!! Slower delivery gets the scalp here. That was down leg, Sarfaraz Khan ended up closing the face of the bat a bit too early and the leading edge was taken by the keeper, who moved to his left by quite a few paces to take it. Dre Russ continues his impact on this game. And have the deliveries started to hold on more now? Might well be the case. Sarfaraz Khan c Karthik b A Russell 13(13) [4s-2]', "A Russell to Sarfaraz Khan, THAT'S OUT!! Caught!!", '7.2', 'A Russell to Sarfaraz Khan, FOUR, what lovely timing! Shortish delivery outside off and has been chopped behind point for a four. That was just touched and it ran away', '7.1', 'A Russell to Agarwal, 1 run, tucks a length delivery and they get a single into the mid-wicket region', 'Andre Russell [1.0-0-7-1] is back into the attack', 'Another piece of controversy? DK handled it pretty well. The third umpire I guess decided that the throw was made with the ball still in play. And hence four overthrows were awarded.', '7', '', 'Runs:', '6.6', 'Kuldeep Yadav to Agarwal, 1 run, flatter delivery outside off and has been stabbed down to long-off for a single', '6.5', 'Kuldeep Yadav to Sarfaraz Khan, 1 run, front of the hand quicker ball and has been dug out into the on-side for a single', '6.4', 'Kuldeep Yadav to Sarfaraz Khan, no run, another googly. Third one of the over. Sarfaraz Khan throws his bat at it and misses. Close to the edge it was', '6.3', 'Kuldeep Yadav to Agarwal, 1 run, little glue certainly on the wicket as the ball hangs on a little longer for the batter to wait to cut it away', '6.2', 'Kuldeep Yadav to Sarfaraz Khan, 1 run, looks to sweep and gets a top-edge. The spinner gets the ball to grip straightaway. Top-edge lands safe and the man at short third cuts it off', '6.1', 'Kuldeep Yadav to Sarfaraz Khan, no run, stays back and chops the ball down into the off-side to find point', 'Kuldeep Yadav, left-arm chinaman, comes into the attack', '6', '12121221221212212', '5.6', 'Prasidh to Sarfaraz Khan, 1 run, steered away down to third man', '5.5', 'Prasidh to Agarwal, 1 run, full and homing into off and middle, Mayank gets a soft leading edge on the flick, nabs a quick single on the off-side', '5.4', 'Prasidh to Sarfaraz Khan, 1 run, pushed away into the off-side', '5.3', 'Prasidh to Sarfaraz Khan, no run, length delivery and decks in, pushed into the deck', '5.2', 'Prasidh to Sarfaraz Khan, no run, shortish ball outside off and has been left alone', '5.1', "Prasidh to Agarwal, 5 runs, a little pause in play. The crowd has also found its voice. There is something that has ooccured which we aren't aware of. Overthrow is it? The on-field umpires have got together. Karthik looks animated. Uthappa and few others have gathered around the umpires. Ashwin is along the boundary line trying to figure out what happened. The umpire has signalled it a four. But Sarfaraz Khan is still on strike. We will figure it out as the game progresses. And we have figured out what happened. The throw from covers was thrown at Dre Russ and he missed it in the lights for the ball to run away into the fence", 'Prasidh Krishna [2.0-0-24-0] is back into the attack', '5', '', '', '4.6', 'A Russell to Agarwal, 1 run, on the pads and has been tucked away into the on-side for a single', '4.5', 'A Russell to Sarfaraz Khan, 1 run, the ball sticks on to the wicket a bit and has been pushed away into the covers for a single', '4.4', 'A Russell to Sarfaraz Khan, four, uncanny? Usual Sarfaraz Khan stuff as he sits down on both knees and upper-steers it. Risky but effective', '4.3', 'A Russell to Sarfaraz Khan, no run, sharp in-ducker at 137kph and Sarfaraz Khan misses the tuck. There was a huge appeal from Russell but that was high and going down', 'Sarfaraz Khan, right handed bat, comes to the crease', '4.2', "A Russell to Gayle, out Caught by Prasidh! What can't you do DreRuss? Have you got a deal cut out with the God of fortune? A short one at the body, not particularly quick @130.8km/h, Gayle gets his weight on the backfoot to pull it away, but with that bat-face turning upwards, gets it off the splice, skywards, as Prasidh runs in to pick it up at mid-on. Huge moment in the game, as both the openers depart. Gayle c Prasidh b A Russell 20(13) [4s-2 6s-2]", "A Russell to Gayle, THAT'S OUT!! Caught!!", '4.1', 'A Russell to Agarwal, 1 run, short of length delivery angling in towards off-stump, glided with a hop to get on top of it towards third man for a single', 'Andre Russell, right-arm fast, comes into the attack', 'Lavan Kumar says: What it would be if Narine, Gayle and Russell are in the same IPL team? -- "Why dream about nightmares?"', '4', '', '3.6', "Ferguson to Gayle, SIX, 142.9km/h, doesn't take the pace off this time, short one on the stumps, but Gayle's trigger is to back away into the on-side - he's absolutely clubbed that, cross-batted, over the long-on fence for six. A fantastic first four balls, spoiled by the last two balls...", '3.5', 'Ferguson to Gayle, FOUR, short of length delivery on the stump, 115.9km/h, Gayle clears that leg and clubs it off the toe-end just over mid-on to the long-on fence for four', '3.4', 'Ferguson to Gayle, no run, yorker length delivery, inch-perfect, 148.2km/h, digs it out off the toe-end', '3.3', 'Ferguson to Gayle, no run, slower delivery on a good length heading for middle, Gayle delays his defence from the crease back down the wicket', '3.3', "Ferguson to Gayle, wide, 148.1km/h, wide down leg, swings away after the ball crosses the batsman's missed flick and swerves to the left of the 'keeper who has done well to collect it", '3.2', 'Ferguson to Gayle, no run, a short one at the body, Gayle is early into the pull - not very slow @142.7km/h, and he misses it completely. Loses his shape, in complete disarray...', '3.1', 'Ferguson to Gayle, no run, 142.5km/h, pitching outside leg, seaming away from the left-hander from over the wicket, Gayle is squared up from a closed stance and is beaten on the outside edge by a long way', '3', ',,', ',', ',', ',...~', '2.6', 'Prasidh to Agarwal, FOUR, 149.2km/h, really quick, but strays on the pads, a full-toss, whipped away to the deep mid-wicket boundary for four. Easy pickings', '2.5', 'Prasidh to Agarwal, no run, slower one, short of length wide outside off, 104.8km/h (Jadeja bowled one at 106 the other night), and backs away into the leg-side to flash at it but is deceived by the slower one - leaves it alone in the end', '2.4', 'Prasidh to Agarwal, no run, 146km/h, short of length delivery without much width of note, Agarwal hops up onto the backfoot and drops it into the off-side', '2.3', 'Prasidh to Agarwal, no run, good length delivery in the channel outside off, Agarwal gets back, opens the face, and steers it straight to point', '2.2', 'Prasidh to Agarwal, four, oh that is laced! Backs away into the on-side, picks up the length ball on off-stump, and absolutely flays that over the in-field to the deep extra cover fence for four', '2.1', 'Prasidh to Agarwal, FOUR, 142.7km/h, length delivery angling into the pads, towards middle, Agarwal shuffles across and closes the face at the last moment whilst on the backfoot to guide it away towards the deep square leg boundary for four', '2.1', "Prasidh to Agarwal, wide, short of length delivery angling down leg, rising steeply, Agarwal misses the glance off a hop and that's a wide down leg-side", '2', '', ',,,,, 2nd over', '', '', '1.6', 'Ferguson to Gayle, no run, short of length delivery hurrying Gayle up, well-directed, Gayle is swiftly onto the backfoot to defend it solidly back to the bowler', '1.5', 'Ferguson to Agarwal, 1 run, back of a length delivery marginally outside off, 141.8km/h, Agarwal steers it down to third man off the backfoot for a single', 'Mayank Agarwal, right handed bat, comes to the crease', '1.4', 'Ferguson to Rahul, out Caught by Kuldeep Yadav! An abomination fo a shot for an Indian Test opener. Rahul backs away into the on-side, picks up a length ball from middle-stump, 145.7km/h, and tries to run his hands through the ball in chipping it over mid-off, miscues and and ends up lobbing it straight to the man at mid-off, succumbing in a rather soft manner. That was pressure. Pressure talking. Rahul c Kuldeep Yadav b Ferguson 1(5)', "Ferguson to Rahul, THAT'S OUT!! Caught!!", '1.3', 'Ferguson to Rahul, no run, short and wide outside off, 140.1km/h, Rahul sets himself up for the cut, flashes, misses', '1.2', 'Ferguson to Rahul, no run, 143.1km/h, short of length delivery angling in at the ribs, Rahul hops up on the crease, drops it with a downward-facing face into the on-side', '1.1', 'Ferguson to Rahul, no run, 143.7km/h, fuller length delivery on off-stump, Rahul walks at it and punches it back to the bowler', 'Lockie Ferguson, right-arm fast, comes into the attack', '1', '## End of 1st over', '0.6', 'Prasidh to Gayle, no run, another sharp short one on the body, 144km/h, Gayle tries backing away into the on-side for leverage on the pull, but it sails over him', "Shahryaar Mirza says: If there is anybody in the world who could give this run-chase a life, it's Christopher Henry Gayle! Be ready, the Gayle Storm is on its way!", '0.5', 'Prasidh to Gayle, FOUR, short of length delivery rising steeply outside off, Gayle backs away and tries carving it away through the point regio, gets a massive top-edge over slip for a boundary to third man', '0.4', "Prasidh to Gayle, no run, 145.4km/h, that's better, good length delivery angling across, Gayle has his feet rooted and tries to swing that over long-off, misses", '0.3', 'Prasidh to Gayle, SIX, 145.1km/h, too short and too wide, Gayle has no interest in it until the ball is almost parallel to him, no unnecessary movement, just gets under it and upper-cuts it over third man for six!', '0.2', 'Prasidh to Gayle, no run, short of length delivery on middle and leg, Gayle opens up and pokes it away off the backfoot towards point with an open face', '0.1', 'Prasidh to Rahul, 1 run, back of a length delivery on the thigh, tucked away in front of square leg for a quick single']
# Searching ball_number line using rex for example like = 1.1 , 2.1, 17.1
import re
ball = re.findall(r'\n([0-9].[1-6]|[1-2][0-9].[1-6])\n',text)
ball
['19.6', '19.5', '19.4', '19.3', '19.2', '19.1', '18.6', '18.5', '18.4', '18.3', '18.2', '18.1', '18.1', '17.6', '17.5', '17.4', '17.3', '17.2', '17.1', '16.6', '16.5', '16.4', '16.3', '16.2', '16.1', '15.6', '15.5', '15.4', '15.3', '15.2', '15.1', '14.6', '14.5', '14.4', '14.3', '14.2', '14.1', '13.6', '13.5', '13.4', '13.3', '13.2', '13.1', '12.6', '12.5', '12.4', '12.3', '12.2', '12.1', '11.6', '11.5', '11.4', '11.3', '11.2', '11.1', '10.6', '10.5', '10.4', '10.3', '10.3', '10.2', '10.1', '9.6', '9.5', '9.4', '9.3', '9.2', '9.1', '8.6', '8.5', '8.4', '8.3', '8.3', '8.2', '8.1', '7.6', '7.5', '7.4', '7.3', '7.2', '7.1', '6.6', '6.5', '6.4', '6.3', '6.2', '6.1', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1', '3.6', '3.5', '3.4', '3.3', '3.3', '3.2', '3.1', '2.6', '2.5', '2.4', '2.3', '2.2', '2.1', '2.1', '1.6', '1.5', '1.4', '1.3', '1.2', '1.1', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1']
#length of documents file = l
l = len(documents)
l
368
# main sentences which are important,
#(ball_no + immidiate commentry line)
#sent = [ , , , , , .....]
sent = []
ball_no = []
for i in range(l):
if documents[i] in ball:
ball_no.append(documents[i])
sentence = documents[i]+','+documents[i+1]
print(sentence)
sent.append(sentence)
19.6,Chawla to Miller, no run, short ball, Miller cuts but finds the man at cover, KKR win by 28 runs 19.5,Chawla to Miller, 2 runs, short and spinning away outside off stump, Miller cuts it to deep point 19.4,Chawla to Mandeep, 1 run, quicker delivery on the stumps, Mandeep flicks it to long-on 19.3,Chawla to Mandeep, FOUR, Chawla is only going to bowl googlies, so Mandeep moves across and scoops the ball over Lynn at short fine leg 19.2,Chawla to Mandeep, 2 runs, googly again, Mandeep works it to mid-wicket and returns for the second 19.1,Chawla to Mandeep, four, short googly, pulled away to deep mid-wicket, Uthappa runs to his right, gets to the ball but fumbles as he tries to hop and stop the ball 18.6,Ferguson to Miller, no run, slower delivery, beaten and Miller grunts 18.5,Ferguson to Miller, SIX, now then, KXIP need seven more of these. But hey, this bloke has backed away to this full ball and somehow sliced this ball over backward point, normally you see the ball travel over cover, incredible hit 18.4,Ferguson to Miller, 2 runs, slower delivery on the leg stump, tucked away towards mid-wicket, easy two. Fifty up for Miller, but no celebrations 18.3,Ferguson to Mandeep, 1 run, very full and outside off stump, Mandeep drills it hard, Ferguson gets a hand on it and the ball rolls towards mid-off 18.2,Ferguson to Mandeep, four, short delivery outside off stump, Mandeep stays back and cuts past backward point, third man doesn't have a real go. Fours won't do it for KXIP 18.1,Ferguson to Miller, 1 run, oh brilliant yorker targetting Miller's boots, dug out into the on-side, looks like that ball jammed the foot off the bat 18.1,Ferguson to Miller, wide, Ferguson begins with a wide down the leg-side 17.6,Prasidh to Mandeep, FOUR, clever hit, short delivery rising steeply, Mandeep stays leg side of the ball and guides it over Karthik for a much needed boundary 17.5,Prasidh to Miller, 1 run, this is a short delivery that rushed onto Miller, the ball takes the splice of the bat and lands safely at mid-wicket, Kuldeep didn't go for the catch, Dre Russ wanted him to sprint and attack the ball. Well, maybe Kuldeep has the World Cup on his mind. Wouldn't want to dive and injure attempting a catch 17.4,Prasidh to Miller, no run, Miller will be kicking himself for missing out on this flick, would have normally put that over deep mid-wicket, the ball lobbed off the pad 17.3,Prasidh to Miller, FOUR, low full toss, drilled hard between the sticks and the non-striker, Dre Russ can't cut it off running from long-off 17.2,Prasidh to Mandeep, 1 run, full toss and Mandeep has only hit it straight to extra-cover, too much bottom hand there looking to power the ball, just needed to time it 17.1,Prasidh to Mandeep, no run, slower delivery on the shorter side, Mandeep plays the pull early and misses 16.6,Ferguson to Mandeep, 1 run, oh this looked funny! Mandeep was attempting the pull shot through mid-wicket, ended up slicing it hard through point because of Ferguson's extra pace 16.5,Ferguson to Mandeep, 2 runs, friendly full toss, but Mandeep has mistimed this drive, chips it over to deep cover 16.4,Ferguson to Miller, 1 run, short slower delivery, Miller swivels and helps it to short fine leg 16.3,Ferguson to Miller, four, this is class batting, knows third man is inside the ring, as soon as Ferguson dropped the slower ball short, Miller was there to just guide in the gap wide of backward point 16.2,Ferguson to Mandeep, 1 run, lovely timing again from Mandeep again, this time he slices this along the ground to deep cover-point 16.1,Ferguson to Mandeep, Six, this is a lovely lofted off-drive, nothing better than this sort of a shot to get going. Length ball, nice pitch to bat on, so Mandeep hit through the line and collected a maximum 15.6,Chawla to Miller, no run, this is a very wide short ball, Miller tried to fetch the pull shot, missed, the ball sneaked under the under edge, Karthik was confident in his appeal, given out and Miller overturned the call by reviewing 15.5,Chawla to Mandeep, 1 run, googly down the leg-side, Mandeep glances it to short fine leg 15.4,Chawla to Miller, 1 run, Miller moves across knowing Chawla will only bowl wide outside off stump, tried to power this over long-on, but toe-ended it along the ground in the end 15.3,Chawla to Mandeep, 1 run, wrong 'un down the leg-side, Mandeep flicks it to backward square leg 15.2,Chawla to Agarwal, out Bowled!! The googly and it takes out the leg stump. Agarwal on one knee to slog-sweep it for six, but missed the ball completely and lost the pole. A fine fifty from Agarwal, but KXIP needed him to push a little more hard chasing 219. Agarwal b Chawla 58(34) [4s-6 6s-1] 15.1,Chawla to Miller, 1 run, shortish delivery outside off stump, punched to deep cover 14.6,Kuldeep Yadav to Miller, 1 run, spinning away outside off stump, Miller stays back and pushes it towards extra-cover 14.5,Kuldeep Yadav to Miller, 4, down the track to drill this hard wide of short cover, Dre Russ slides and stops the ball, but was his back foot in touch with the rope when he was in contact with the ball? Third umpire checks, four it is 14.4,Kuldeep Yadav to Agarwal, 1 run, punched away to long-on 14.3,Kuldeep Yadav to Agarwal, 2 runs, in the airrr, dropped, Rinku Singh the sub! Flighted delivery outside off stump, Agarwal steps out and reaches out to this widish delivery, sliced it, Rinku ran to his left and dived full length forward but it didn't stick 14.2,Kuldeep Yadav to Miller, 1 run, swept away uppishly to deep mid-wicket 14.1,Kuldeep Yadav to Miller, no run, Miller moved across to target mid-wicket, but Kuldeep Yadav fired it flat and straight, forcing Miller to defend it back to the bowler 13.6,A Russell to Agarwal, 2 runs, very full, dug out literally and it rockets past Russell, long-off cuts it off and it's another two. It was an over for couples 13.5,A Russell to Agarwal, no run, slower ball bouncer, Agarwal didn't have the pace to ramp this ball, missed it completely, may not have gone to the fence even if he had made decent contact 13.4,A Russell to Agarwal, 2 runs, another soft nudge to the right deep mid-wicket this time for a couple of runs 13.3,A Russell to Agarwal, 2 runs, flicked wide of long-on, two is call and he's home. Fifty for Agarwal, his 4th in IPL, good length delivery on the stumps, Agarwal hits the gap nicely on that occasion 13.2,A Russell to Agarwal, no run, short and rising, Agarwal stayed leg-side of the ball and tried to guide that away towards third man, missed 13.1,A Russell to Agarwal, 2 runs, nice slower delivery outside off stump, Mayank flicks through the vacant mid-wicket region, scampers back for the second 12.6,Chawla to Miller, 2 runs, short ball, the googly again, Miller pulls to deep mid-wicket, fumble from Kuldeep and Agarwal calls for the second run, gets home easily 12.5,Chawla to Miller, no run, shortish and outside off stump, Miller mistimes the cut towards cover 12.4,Chawla to Miller, no run, pushed into the off-side 12.3,Chawla to Agarwal, leg byes, 1 run, quicker googly, the ball rolls behind square off the pad, missing leg 12.2,Chawla to Agarwal, Six, oh these bats, modern day cricket, power, so cruel for the bowler. Quickish delivery on the leg stump, Agarwal was caught between a sweep shot and a pull shot, but he's somehow sweetly muscled this to clear backward square leg 12.1,Chawla to Miller, 1 run, googly that keeps a touch low, Miller cuts it to deep point 11.6,Narine to Agarwal, FOUR, and cheeky! Waits on it and opens the face of the blade to glide it away to deep third man for a four 11.5,Narine to Agarwal, FOUR, slapped! That was powered down the ground. Not too far from the bowler, not too far from the sticks and the ball escaped into the fence 11.4,Narine to Miller, 1 run, tucks the ball away into the on-side and calls of 'two' were made but they settle for a single 11.3,Narine to Miller, four, smashes the ball away again. Shortish ball and has been pulled away past deep mid for a four 11.2,Narine to Miller, SIX, too full, the leverage was there and he has muscled it over the bowler's head for a towering sixer. Massive hit from Killer Miller 11.1,Narine to Miller, no run, the offie, turning away, misses as he tries to drive it 10.6,Kuldeep Yadav to Miller, 1 run, dropped chance? Or runs saved? Lockie Ferguson at deep backward square popped the ball up trying to catch it and then flicked the ball back into the playing area while his body toppled over the cushion. But he did well to stop it. The fence was on his mind and hence he dropped it thinking he will trip over. That was flighted and Miller again had picked up the slog sweep option to disperse the ball away 10.5,Kuldeep Yadav to Miller, 6, and the sweep gets him out of jail. Emphatically. Knelt down and smacked it. The bat made a massive noise as it met the ball. The ball whistled over deep mid 10.4,Kuldeep Yadav to Miller, no run, lucky! Slower delivery at 76kph and Miller was through with his cut shot too early. Gets a big inside edge which misses the sticks by a few inches 10.3,Kuldeep Yadav to Agarwal, 1 run, spins in and has been tucked off the pads for a single to deep mid 10.3,Kuldeep Yadav to Agarwal, wide, helium on that delivery as it was floated up too much. But was dished out too wide. Wided 10.2,Kuldeep Yadav to Miller, 1 run, too full, on the pads, unsweepable length ( trying to lexicograph), clipped to deep mid for a single 10.1,Kuldeep Yadav to Miller, no run, fuller and pushed back to the bowler off the full face of the bat 9.6,Narine to Agarwal, FOUR, a whippy sweep-type-clip off the pads as it was too full for Agarwal to abort his attempted sweep. So, he bent a little and whipped it away past the dive of the deep square leg fielder for a four. The rate required is now 14.2 9.5,Narine to Miller, 1 run, flatter delivery and has been powered away flat on to the on-side for a single to deep mid 9.4,Narine to Agarwal, 1 run, the offie again, dips in and has been tucked down to long-on for a single 9.3,Narine to Miller, 1 run, enough of the off-side play. Drags the ball away into the on-side. Courtesy - a sweep 9.2,Narine to Miller, no run, loopy, slightly shortish, grips a bit and Miller misses the cut 9.1,Narine to Miller, no run, starts with an offie in his 100th IPL game. Miller jabs at it and misses 8.6,Kuldeep Yadav to Miller, 1 run, charges out, drives the ball down to long-on and gets a single 8.5,Kuldeep Yadav to Miller, FOUR, when in doubt, sweep! Did so of late against Lanka in the T20Is and now also repeating the same. Knelt down and swept it in front of square for a four 8.4,Kuldeep Yadav to Miller, no run, another googly and has been misread. Off the inner half of the bat to short mid 8.3,Kuldeep Yadav to Agarwal, 1 run, shortish delivery and has been chopped out to deep cover for a single 8.3,Kuldeep Yadav to Agarwal, wide, too wide. Spills the googly too wide outside off and was wided as Agarwal left it alone 8.2,Kuldeep Yadav to Miller, 1 run, tossed up delivery and has been driven down to long-off for a single. The required rate now is closing in on 14 8.1,Kuldeep Yadav to Agarwal, 1 run, shortish delivery outside off and has been chopped down to deep cover for a single 7.6,A Russell to Miller, no run, on the pads, on a length and Miller misses the tuck 7.5,A Russell to Agarwal, 1 run, tucked off the pads, short fine leg picks it up. Single taken 7.4,A Russell to Agarwal, no run, bangs the short ball in, Agarwal ducks down to stay away from harm's way 7.3,A Russell to Sarfaraz Khan, out Caught by Karthik!! Slower delivery gets the scalp here. That was down leg, Sarfaraz Khan ended up closing the face of the bat a bit too early and the leading edge was taken by the keeper, who moved to his left by quite a few paces to take it. Dre Russ continues his impact on this game. And have the deliveries started to hold on more now? Might well be the case. Sarfaraz Khan c Karthik b A Russell 13(13) [4s-2] 7.2,A Russell to Sarfaraz Khan, FOUR, what lovely timing! Shortish delivery outside off and has been chopped behind point for a four. That was just touched and it ran away 7.1,A Russell to Agarwal, 1 run, tucks a length delivery and they get a single into the mid-wicket region 6.6,Kuldeep Yadav to Agarwal, 1 run, flatter delivery outside off and has been stabbed down to long-off for a single 6.5,Kuldeep Yadav to Sarfaraz Khan, 1 run, front of the hand quicker ball and has been dug out into the on-side for a single 6.4,Kuldeep Yadav to Sarfaraz Khan, no run, another googly. Third one of the over. Sarfaraz Khan throws his bat at it and misses. Close to the edge it was 6.3,Kuldeep Yadav to Agarwal, 1 run, little glue certainly on the wicket as the ball hangs on a little longer for the batter to wait to cut it away 6.2,Kuldeep Yadav to Sarfaraz Khan, 1 run, looks to sweep and gets a top-edge. The spinner gets the ball to grip straightaway. Top-edge lands safe and the man at short third cuts it off 6.1,Kuldeep Yadav to Sarfaraz Khan, no run, stays back and chops the ball down into the off-side to find point 5.6,Prasidh to Sarfaraz Khan, 1 run, steered away down to third man 5.5,Prasidh to Agarwal, 1 run, full and homing into off and middle, Mayank gets a soft leading edge on the flick, nabs a quick single on the off-side 5.4,Prasidh to Sarfaraz Khan, 1 run, pushed away into the off-side 5.3,Prasidh to Sarfaraz Khan, no run, length delivery and decks in, pushed into the deck 5.2,Prasidh to Sarfaraz Khan, no run, shortish ball outside off and has been left alone 5.1,Prasidh to Agarwal, 5 runs, a little pause in play. The crowd has also found its voice. There is something that has ooccured which we aren't aware of. Overthrow is it? The on-field umpires have got together. Karthik looks animated. Uthappa and few others have gathered around the umpires. Ashwin is along the boundary line trying to figure out what happened. The umpire has signalled it a four. But Sarfaraz Khan is still on strike. We will figure it out as the game progresses. And we have figured out what happened. The throw from covers was thrown at Dre Russ and he missed it in the lights for the ball to run away into the fence 4.6,A Russell to Agarwal, 1 run, on the pads and has been tucked away into the on-side for a single 4.5,A Russell to Sarfaraz Khan, 1 run, the ball sticks on to the wicket a bit and has been pushed away into the covers for a single 4.4,A Russell to Sarfaraz Khan, four, uncanny? Usual Sarfaraz Khan stuff as he sits down on both knees and upper-steers it. Risky but effective 4.3,A Russell to Sarfaraz Khan, no run, sharp in-ducker at 137kph and Sarfaraz Khan misses the tuck. There was a huge appeal from Russell but that was high and going down 4.2,A Russell to Gayle, out Caught by Prasidh! What can't you do DreRuss? Have you got a deal cut out with the God of fortune? A short one at the body, not particularly quick @130.8km/h, Gayle gets his weight on the backfoot to pull it away, but with that bat-face turning upwards, gets it off the splice, skywards, as Prasidh runs in to pick it up at mid-on. Huge moment in the game, as both the openers depart. Gayle c Prasidh b A Russell 20(13) [4s-2 6s-2] 4.1,A Russell to Agarwal, 1 run, short of length delivery angling in towards off-stump, glided with a hop to get on top of it towards third man for a single 3.6,Ferguson to Gayle, SIX, 142.9km/h, doesn't take the pace off this time, short one on the stumps, but Gayle's trigger is to back away into the on-side - he's absolutely clubbed that, cross-batted, over the long-on fence for six. A fantastic first four balls, spoiled by the last two balls... 3.5,Ferguson to Gayle, FOUR, short of length delivery on the stump, 115.9km/h, Gayle clears that leg and clubs it off the toe-end just over mid-on to the long-on fence for four 3.4,Ferguson to Gayle, no run, yorker length delivery, inch-perfect, 148.2km/h, digs it out off the toe-end 3.3,Ferguson to Gayle, no run, slower delivery on a good length heading for middle, Gayle delays his defence from the crease back down the wicket 3.3,Ferguson to Gayle, wide, 148.1km/h, wide down leg, swings away after the ball crosses the batsman's missed flick and swerves to the left of the 'keeper who has done well to collect it 3.2,Ferguson to Gayle, no run, a short one at the body, Gayle is early into the pull - not very slow @142.7km/h, and he misses it completely. Loses his shape, in complete disarray... 3.1,Ferguson to Gayle, no run, 142.5km/h, pitching outside leg, seaming away from the left-hander from over the wicket, Gayle is squared up from a closed stance and is beaten on the outside edge by a long way 2.6,Prasidh to Agarwal, FOUR, 149.2km/h, really quick, but strays on the pads, a full-toss, whipped away to the deep mid-wicket boundary for four. Easy pickings 2.5,Prasidh to Agarwal, no run, slower one, short of length wide outside off, 104.8km/h (Jadeja bowled one at 106 the other night), and backs away into the leg-side to flash at it but is deceived by the slower one - leaves it alone in the end 2.4,Prasidh to Agarwal, no run, 146km/h, short of length delivery without much width of note, Agarwal hops up onto the backfoot and drops it into the off-side 2.3,Prasidh to Agarwal, no run, good length delivery in the channel outside off, Agarwal gets back, opens the face, and steers it straight to point 2.2,Prasidh to Agarwal, four, oh that is laced! Backs away into the on-side, picks up the length ball on off-stump, and absolutely flays that over the in-field to the deep extra cover fence for four 2.1,Prasidh to Agarwal, FOUR, 142.7km/h, length delivery angling into the pads, towards middle, Agarwal shuffles across and closes the face at the last moment whilst on the backfoot to guide it away towards the deep square leg boundary for four 2.1,Prasidh to Agarwal, wide, short of length delivery angling down leg, rising steeply, Agarwal misses the glance off a hop and that's a wide down leg-side 1.6,Ferguson to Gayle, no run, short of length delivery hurrying Gayle up, well-directed, Gayle is swiftly onto the backfoot to defend it solidly back to the bowler 1.5,Ferguson to Agarwal, 1 run, back of a length delivery marginally outside off, 141.8km/h, Agarwal steers it down to third man off the backfoot for a single 1.4,Ferguson to Rahul, out Caught by Kuldeep Yadav! An abomination fo a shot for an Indian Test opener. Rahul backs away into the on-side, picks up a length ball from middle-stump, 145.7km/h, and tries to run his hands through the ball in chipping it over mid-off, miscues and and ends up lobbing it straight to the man at mid-off, succumbing in a rather soft manner. That was pressure. Pressure talking. Rahul c Kuldeep Yadav b Ferguson 1(5) 1.3,Ferguson to Rahul, no run, short and wide outside off, 140.1km/h, Rahul sets himself up for the cut, flashes, misses 1.2,Ferguson to Rahul, no run, 143.1km/h, short of length delivery angling in at the ribs, Rahul hops up on the crease, drops it with a downward-facing face into the on-side 1.1,Ferguson to Rahul, no run, 143.7km/h, fuller length delivery on off-stump, Rahul walks at it and punches it back to the bowler 0.6,Prasidh to Gayle, no run, another sharp short one on the body, 144km/h, Gayle tries backing away into the on-side for leverage on the pull, but it sails over him 0.5,Prasidh to Gayle, FOUR, short of length delivery rising steeply outside off, Gayle backs away and tries carving it away through the point regio, gets a massive top-edge over slip for a boundary to third man 0.4,Prasidh to Gayle, no run, 145.4km/h, that's better, good length delivery angling across, Gayle has his feet rooted and tries to swing that over long-off, misses 0.3,Prasidh to Gayle, SIX, 145.1km/h, too short and too wide, Gayle has no interest in it until the ball is almost parallel to him, no unnecessary movement, just gets under it and upper-cuts it over third man for six! 0.2,Prasidh to Gayle, no run, short of length delivery on middle and leg, Gayle opens up and pokes it away off the backfoot towards point with an open face 0.1,Prasidh to Rahul, 1 run, back of a length delivery on the thigh, tucked away in front of square leg for a quick single
sent.reverse()
# sent is list of all important commentry lines starting from 0.1 ball to last ball
sent[0]
'0.1,Prasidh to Rahul, 1 run, back of a length delivery on the thigh, tucked away in front of square leg for a quick single'
x = len(sent)
x
125
# splitting each commentry present in sent list by comma seprated & storing it in line list
#line is list of list
#line = [[],[],[].......]
line = []
for i in range(x):
line.append(sent[i].split(','))
lx = len(line)
print(lx)
line[0]
125
['0.1', 'Prasidh to Rahul', ' 1 run', ' back of a length delivery on the thigh', ' tucked away in front of square leg for a quick single']
# Finding batsman and ballers
batsman = []
ballers = []
for i in range(lx):
players = line[i][1].split('to')
batsman.append(players[1])
ballers.append(players[0])
batsman
[' Rahul', ' Gayle', ' Gayle', ' Gayle', ' Gayle', ' Gayle', ' Rahul', ' Rahul', ' Rahul', ' Rahul', ' Agarwal', ' Gayle', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Gayle', ' Gayle', ' Gayle', ' Gayle', ' Gayle', ' Gayle', ' Gayle', ' Agarwal', ' Gayle', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Agarwal', ' Agarwal', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Agarwal', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Agarwal', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Agarwal', ' Agarwal', ' Sarfaraz Khan', ' Sarfaraz Khan', ' Agarwal', ' Agarwal', ' Miller', ' Agarwal', ' Miller', ' Agarwal', ' Agarwal', ' Miller', ' Miller', ' Miller', ' Miller', ' Miller', ' Miller', ' Agarwal', ' Miller', ' Agarwal', ' Miller', ' Miller', ' Agarwal', ' Agarwal', ' Miller', ' Miller', ' Miller', ' Miller', ' Miller', ' Miller', ' Miller', ' Agarwal', ' Agarwal', ' Miller', ' Agarwal', ' Agarwal', ' Miller', ' Miller', ' Miller', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Agarwal', ' Miller', ' Miller', ' Agarwal', ' Agarwal', ' Miller', ' Miller', ' Miller', ' Agarwal', ' Mandeep', ' Miller', ' Mandeep', ' Miller', ' Mandeep', ' Mandeep', ' Miller', ' Miller', ' Mandeep', ' Mandeep', ' Mandeep', ' Mandeep', ' Miller', ' Miller', ' Miller', ' Mandeep', ' Miller', ' Miller', ' Mandeep', ' Mandeep', ' Miller', ' Miller', ' Miller', ' Mandeep', ' Mandeep', ' Mandeep', ' Mandeep', ' Miller', ' Miller']
line
[['0.1', 'Prasidh to Rahul', ' 1 run', ' back of a length delivery on the thigh', ' tucked away in front of square leg for a quick single'], ['0.2', 'Prasidh to Gayle', ' no run', ' short of length delivery on middle and leg', ' Gayle opens up and pokes it away off the backfoot towards point with an open face'], ['0.3', 'Prasidh to Gayle', ' SIX', ' 145.1km/h', ' too short and too wide', ' Gayle has no interest in it until the ball is almost parallel to him', ' no unnecessary movement', ' just gets under it and upper-cuts it over third man for six!'], ['0.4', 'Prasidh to Gayle', ' no run', ' 145.4km/h', " that's better", ' good length delivery angling across', ' Gayle has his feet rooted and tries to swing that over long-off', ' misses'], ['0.5', 'Prasidh to Gayle', ' FOUR', ' short of length delivery rising steeply outside off', ' Gayle backs away and tries carving it away through the point regio', ' gets a massive top-edge over slip for a boundary to third man'], ['0.6', 'Prasidh to Gayle', ' no run', ' another sharp short one on the body', ' 144km/h', ' Gayle tries backing away into the on-side for leverage on the pull', ' but it sails over him'], ['1.1', 'Ferguson to Rahul', ' no run', ' 143.7km/h', ' fuller length delivery on off-stump', ' Rahul walks at it and punches it back to the bowler'], ['1.2', 'Ferguson to Rahul', ' no run', ' 143.1km/h', ' short of length delivery angling in at the ribs', ' Rahul hops up on the crease', ' drops it with a downward-facing face into the on-side'], ['1.3', 'Ferguson to Rahul', ' no run', ' short and wide outside off', ' 140.1km/h', ' Rahul sets himself up for the cut', ' flashes', ' misses'], ['1.4', 'Ferguson to Rahul', ' out Caught by Kuldeep Yadav! An abomination fo a shot for an Indian Test opener. Rahul backs away into the on-side', ' picks up a length ball from middle-stump', ' 145.7km/h', ' and tries to run his hands through the ball in chipping it over mid-off', ' miscues and and ends up lobbing it straight to the man at mid-off', ' succumbing in a rather soft manner. That was pressure. Pressure talking. Rahul c Kuldeep Yadav b Ferguson 1(5)'], ['1.5', 'Ferguson to Agarwal', ' 1 run', ' back of a length delivery marginally outside off', ' 141.8km/h', ' Agarwal steers it down to third man off the backfoot for a single'], ['1.6', 'Ferguson to Gayle', ' no run', ' short of length delivery hurrying Gayle up', ' well-directed', ' Gayle is swiftly onto the backfoot to defend it solidly back to the bowler'], ['2.1', 'Prasidh to Agarwal', ' wide', ' short of length delivery angling down leg', ' rising steeply', " Agarwal misses the glance off a hop and that's a wide down leg-side"], ['2.1', 'Prasidh to Agarwal', ' FOUR', ' 142.7km/h', ' length delivery angling into the pads', ' towards middle', ' Agarwal shuffles across and closes the face at the last moment whilst on the backfoot to guide it away towards the deep square leg boundary for four'], ['2.2', 'Prasidh to Agarwal', ' four', ' oh that is laced! Backs away into the on-side', ' picks up the length ball on off-stump', ' and absolutely flays that over the in-field to the deep extra cover fence for four'], ['2.3', 'Prasidh to Agarwal', ' no run', ' good length delivery in the channel outside off', ' Agarwal gets back', ' opens the face', ' and steers it straight to point'], ['2.4', 'Prasidh to Agarwal', ' no run', ' 146km/h', ' short of length delivery without much width of note', ' Agarwal hops up onto the backfoot and drops it into the off-side'], ['2.5', 'Prasidh to Agarwal', ' no run', ' slower one', ' short of length wide outside off', ' 104.8km/h (Jadeja bowled one at 106 the other night)', ' and backs away into the leg-side to flash at it but is deceived by the slower one - leaves it alone in the end'], ['2.6', 'Prasidh to Agarwal', ' FOUR', ' 149.2km/h', ' really quick', ' but strays on the pads', ' a full-toss', ' whipped away to the deep mid-wicket boundary for four. Easy pickings'], ['3.1', 'Ferguson to Gayle', ' no run', ' 142.5km/h', ' pitching outside leg', ' seaming away from the left-hander from over the wicket', ' Gayle is squared up from a closed stance and is beaten on the outside edge by a long way'], ['3.2', 'Ferguson to Gayle', ' no run', ' a short one at the body', ' Gayle is early into the pull - not very slow @142.7km/h', ' and he misses it completely. Loses his shape', ' in complete disarray...'], ['3.3', 'Ferguson to Gayle', ' wide', ' 148.1km/h', ' wide down leg', " swings away after the ball crosses the batsman's missed flick and swerves to the left of the 'keeper who has done well to collect it"], ['3.3', 'Ferguson to Gayle', ' no run', ' slower delivery on a good length heading for middle', ' Gayle delays his defence from the crease back down the wicket'], ['3.4', 'Ferguson to Gayle', ' no run', ' yorker length delivery', ' inch-perfect', ' 148.2km/h', ' digs it out off the toe-end'], ['3.5', 'Ferguson to Gayle', ' FOUR', ' short of length delivery on the stump', ' 115.9km/h', ' Gayle clears that leg and clubs it off the toe-end just over mid-on to the long-on fence for four'], ['3.6', 'Ferguson to Gayle', ' SIX', ' 142.9km/h', " doesn't take the pace off this time", ' short one on the stumps', " but Gayle's trigger is to back away into the on-side - he's absolutely clubbed that", ' cross-batted', ' over the long-on fence for six. A fantastic first four balls', ' spoiled by the last two balls...'], ['4.1', 'A Russell to Agarwal', ' 1 run', ' short of length delivery angling in towards off-stump', ' glided with a hop to get on top of it towards third man for a single'], ['4.2', 'A Russell to Gayle', " out Caught by Prasidh! What can't you do DreRuss? Have you got a deal cut out with the God of fortune? A short one at the body", ' not particularly quick @130.8km/h', ' Gayle gets his weight on the backfoot to pull it away', ' but with that bat-face turning upwards', ' gets it off the splice', ' skywards', ' as Prasidh runs in to pick it up at mid-on. Huge moment in the game', ' as both the openers depart. Gayle c Prasidh b A Russell 20(13) [4s-2 6s-2]'], ['4.3', 'A Russell to Sarfaraz Khan', ' no run', ' sharp in-ducker at 137kph and Sarfaraz Khan misses the tuck. There was a huge appeal from Russell but that was high and going down'], ['4.4', 'A Russell to Sarfaraz Khan', ' four', ' uncanny? Usual Sarfaraz Khan stuff as he sits down on both knees and upper-steers it. Risky but effective'], ['4.5', 'A Russell to Sarfaraz Khan', ' 1 run', ' the ball sticks on to the wicket a bit and has been pushed away into the covers for a single'], ['4.6', 'A Russell to Agarwal', ' 1 run', ' on the pads and has been tucked away into the on-side for a single'], ['5.1', 'Prasidh to Agarwal', ' 5 runs', " a little pause in play. The crowd has also found its voice. There is something that has ooccured which we aren't aware of. Overthrow is it? The on-field umpires have got together. Karthik looks animated. Uthappa and few others have gathered around the umpires. Ashwin is along the boundary line trying to figure out what happened. The umpire has signalled it a four. But Sarfaraz Khan is still on strike. We will figure it out as the game progresses. And we have figured out what happened. The throw from covers was thrown at Dre Russ and he missed it in the lights for the ball to run away into the fence"], ['5.2', 'Prasidh to Sarfaraz Khan', ' no run', ' shortish ball outside off and has been left alone'], ['5.3', 'Prasidh to Sarfaraz Khan', ' no run', ' length delivery and decks in', ' pushed into the deck'], ['5.4', 'Prasidh to Sarfaraz Khan', ' 1 run', ' pushed away into the off-side'], ['5.5', 'Prasidh to Agarwal', ' 1 run', ' full and homing into off and middle', ' Mayank gets a soft leading edge on the flick', ' nabs a quick single on the off-side'], ['5.6', 'Prasidh to Sarfaraz Khan', ' 1 run', ' steered away down to third man'], ['6.1', 'Kuldeep Yadav to Sarfaraz Khan', ' no run', ' stays back and chops the ball down into the off-side to find point'], ['6.2', 'Kuldeep Yadav to Sarfaraz Khan', ' 1 run', ' looks to sweep and gets a top-edge. The spinner gets the ball to grip straightaway. Top-edge lands safe and the man at short third cuts it off'], ['6.3', 'Kuldeep Yadav to Agarwal', ' 1 run', ' little glue certainly on the wicket as the ball hangs on a little longer for the batter to wait to cut it away'], ['6.4', 'Kuldeep Yadav to Sarfaraz Khan', ' no run', ' another googly. Third one of the over. Sarfaraz Khan throws his bat at it and misses. Close to the edge it was'], ['6.5', 'Kuldeep Yadav to Sarfaraz Khan', ' 1 run', ' front of the hand quicker ball and has been dug out into the on-side for a single'], ['6.6', 'Kuldeep Yadav to Agarwal', ' 1 run', ' flatter delivery outside off and has been stabbed down to long-off for a single'], ['7.1', 'A Russell to Agarwal', ' 1 run', ' tucks a length delivery and they get a single into the mid-wicket region'], ['7.2', 'A Russell to Sarfaraz Khan', ' FOUR', ' what lovely timing! Shortish delivery outside off and has been chopped behind point for a four. That was just touched and it ran away'], ['7.3', 'A Russell to Sarfaraz Khan', ' out Caught by Karthik!! Slower delivery gets the scalp here. That was down leg', ' Sarfaraz Khan ended up closing the face of the bat a bit too early and the leading edge was taken by the keeper', ' who moved to his left by quite a few paces to take it. Dre Russ continues his impact on this game. And have the deliveries started to hold on more now? Might well be the case. Sarfaraz Khan c Karthik b A Russell 13(13) [4s-2]'], ['7.4', 'A Russell to Agarwal', ' no run', ' bangs the short ball in', " Agarwal ducks down to stay away from harm's way"], ['7.5', 'A Russell to Agarwal', ' 1 run', ' tucked off the pads', ' short fine leg picks it up. Single taken'], ['7.6', 'A Russell to Miller', ' no run', ' on the pads', ' on a length and Miller misses the tuck'], ['8.1', 'Kuldeep Yadav to Agarwal', ' 1 run', ' shortish delivery outside off and has been chopped down to deep cover for a single'], ['8.2', 'Kuldeep Yadav to Miller', ' 1 run', ' tossed up delivery and has been driven down to long-off for a single. The required rate now is closing in on 14'], ['8.3', 'Kuldeep Yadav to Agarwal', ' wide', ' too wide. Spills the googly too wide outside off and was wided as Agarwal left it alone'], ['8.3', 'Kuldeep Yadav to Agarwal', ' 1 run', ' shortish delivery and has been chopped out to deep cover for a single'], ['8.4', 'Kuldeep Yadav to Miller', ' no run', ' another googly and has been misread. Off the inner half of the bat to short mid'], ['8.5', 'Kuldeep Yadav to Miller', ' FOUR', ' when in doubt', ' sweep! Did so of late against Lanka in the T20Is and now also repeating the same. Knelt down and swept it in front of square for a four'], ['8.6', 'Kuldeep Yadav to Miller', ' 1 run', ' charges out', ' drives the ball down to long-on and gets a single'], ['9.1', 'Narine to Miller', ' no run', ' starts with an offie in his 100th IPL game. Miller jabs at it and misses'], ['9.2', 'Narine to Miller', ' no run', ' loopy', ' slightly shortish', ' grips a bit and Miller misses the cut'], ['9.3', 'Narine to Miller', ' 1 run', ' enough of the off-side play. Drags the ball away into the on-side. Courtesy - a sweep'], ['9.4', 'Narine to Agarwal', ' 1 run', ' the offie again', ' dips in and has been tucked down to long-on for a single'], ['9.5', 'Narine to Miller', ' 1 run', ' flatter delivery and has been powered away flat on to the on-side for a single to deep mid'], ['9.6', 'Narine to Agarwal', ' FOUR', ' a whippy sweep-type-clip off the pads as it was too full for Agarwal to abort his attempted sweep. So', ' he bent a little and whipped it away past the dive of the deep square leg fielder for a four. The rate required is now 14.2'], ['10.1', 'Kuldeep Yadav to Miller', ' no run', ' fuller and pushed back to the bowler off the full face of the bat'], ['10.2', 'Kuldeep Yadav to Miller', ' 1 run', ' too full', ' on the pads', ' unsweepable length ( trying to lexicograph)', ' clipped to deep mid for a single'], ['10.3', 'Kuldeep Yadav to Agarwal', ' wide', ' helium on that delivery as it was floated up too much. But was dished out too wide. Wided'], ['10.3', 'Kuldeep Yadav to Agarwal', ' 1 run', ' spins in and has been tucked off the pads for a single to deep mid'], ['10.4', 'Kuldeep Yadav to Miller', ' no run', ' lucky! Slower delivery at 76kph and Miller was through with his cut shot too early. Gets a big inside edge which misses the sticks by a few inches'], ['10.5', 'Kuldeep Yadav to Miller', ' 6', ' and the sweep gets him out of jail. Emphatically. Knelt down and smacked it. The bat made a massive noise as it met the ball. The ball whistled over deep mid'], ['10.6', 'Kuldeep Yadav to Miller', ' 1 run', ' dropped chance? Or runs saved? Lockie Ferguson at deep backward square popped the ball up trying to catch it and then flicked the ball back into the playing area while his body toppled over the cushion. But he did well to stop it. The fence was on his mind and hence he dropped it thinking he will trip over. That was flighted and Miller again had picked up the slog sweep option to disperse the ball away'], ['11.1', 'Narine to Miller', ' no run', ' the offie', ' turning away', ' misses as he tries to drive it'], ['11.2', 'Narine to Miller', ' SIX', ' too full', " the leverage was there and he has muscled it over the bowler's head for a towering sixer. Massive hit from Killer Miller"], ['11.3', 'Narine to Miller', ' four', ' smashes the ball away again. Shortish ball and has been pulled away past deep mid for a four'], ['11.4', 'Narine to Miller', ' 1 run', " tucks the ball away into the on-side and calls of 'two' were made but they settle for a single"], ['11.5', 'Narine to Agarwal', ' FOUR', ' slapped! That was powered down the ground. Not too far from the bowler', ' not too far from the sticks and the ball escaped into the fence'], ['11.6', 'Narine to Agarwal', ' FOUR', ' and cheeky! Waits on it and opens the face of the blade to glide it away to deep third man for a four'], ['12.1', 'Chawla to Miller', ' 1 run', ' googly that keeps a touch low', ' Miller cuts it to deep point'], ['12.2', 'Chawla to Agarwal', ' Six', ' oh these bats', ' modern day cricket', ' power', ' so cruel for the bowler. Quickish delivery on the leg stump', ' Agarwal was caught between a sweep shot and a pull shot', " but he's somehow sweetly muscled this to clear backward square leg"], ['12.3', 'Chawla to Agarwal', ' leg byes', ' 1 run', ' quicker googly', ' the ball rolls behind square off the pad', ' missing leg'], ['12.4', 'Chawla to Miller', ' no run', ' pushed into the off-side'], ['12.5', 'Chawla to Miller', ' no run', ' shortish and outside off stump', ' Miller mistimes the cut towards cover'], ['12.6', 'Chawla to Miller', ' 2 runs', ' short ball', ' the googly again', ' Miller pulls to deep mid-wicket', ' fumble from Kuldeep and Agarwal calls for the second run', ' gets home easily'], ['13.1', 'A Russell to Agarwal', ' 2 runs', ' nice slower delivery outside off stump', ' Mayank flicks through the vacant mid-wicket region', ' scampers back for the second'], ['13.2', 'A Russell to Agarwal', ' no run', ' short and rising', ' Agarwal stayed leg-side of the ball and tried to guide that away towards third man', ' missed'], ['13.3', 'A Russell to Agarwal', ' 2 runs', ' flicked wide of long-on', " two is call and he's home. Fifty for Agarwal", ' his 4th in IPL', ' good length delivery on the stumps', ' Agarwal hits the gap nicely on that occasion'], ['13.4', 'A Russell to Agarwal', ' 2 runs', ' another soft nudge to the right deep mid-wicket this time for a couple of runs'], ['13.5', 'A Russell to Agarwal', ' no run', ' slower ball bouncer', " Agarwal didn't have the pace to ramp this ball", ' missed it completely', ' may not have gone to the fence even if he had made decent contact'], ['13.6', 'A Russell to Agarwal', ' 2 runs', ' very full', ' dug out literally and it rockets past Russell', " long-off cuts it off and it's another two. It was an over for couples"], ['14.1', 'Kuldeep Yadav to Miller', ' no run', ' Miller moved across to target mid-wicket', ' but Kuldeep Yadav fired it flat and straight', ' forcing Miller to defend it back to the bowler'], ['14.2', 'Kuldeep Yadav to Miller', ' 1 run', ' swept away uppishly to deep mid-wicket'], ['14.3', 'Kuldeep Yadav to Agarwal', ' 2 runs', ' in the airrr', ' dropped', ' Rinku Singh the sub! Flighted delivery outside off stump', ' Agarwal steps out and reaches out to this widish delivery', ' sliced it', " Rinku ran to his left and dived full length forward but it didn't stick"], ['14.4', 'Kuldeep Yadav to Agarwal', ' 1 run', ' punched away to long-on'], ['14.5', 'Kuldeep Yadav to Miller', ' 4', ' down the track to drill this hard wide of short cover', ' Dre Russ slides and stops the ball', ' but was his back foot in touch with the rope when he was in contact with the ball? Third umpire checks', ' four it is'], ['14.6', 'Kuldeep Yadav to Miller', ' 1 run', ' spinning away outside off stump', ' Miller stays back and pushes it towards extra-cover'], ['15.1', 'Chawla to Miller', ' 1 run', ' shortish delivery outside off stump', ' punched to deep cover'], ['15.2', 'Chawla to Agarwal', ' out Bowled!! The googly and it takes out the leg stump. Agarwal on one knee to slog-sweep it for six', ' but missed the ball completely and lost the pole. A fine fifty from Agarwal', ' but KXIP needed him to push a little more hard chasing 219. Agarwal b Chawla 58(34) [4s-6 6s-1]'], ['15.3', 'Chawla to Mandeep', ' 1 run', " wrong 'un down the leg-side", ' Mandeep flicks it to backward square leg'], ['15.4', 'Chawla to Miller', ' 1 run', ' Miller moves across knowing Chawla will only bowl wide outside off stump', ' tried to power this over long-on', ' but toe-ended it along the ground in the end'], ['15.5', 'Chawla to Mandeep', ' 1 run', ' googly down the leg-side', ' Mandeep glances it to short fine leg'], ['15.6', 'Chawla to Miller', ' no run', ' this is a very wide short ball', ' Miller tried to fetch the pull shot', ' missed', ' the ball sneaked under the under edge', ' Karthik was confident in his appeal', ' given out and Miller overturned the call by reviewing'], ['16.1', 'Ferguson to Mandeep', ' Six', ' this is a lovely lofted off-drive', ' nothing better than this sort of a shot to get going. Length ball', ' nice pitch to bat on', ' so Mandeep hit through the line and collected a maximum'], ['16.2', 'Ferguson to Mandeep', ' 1 run', ' lovely timing again from Mandeep again', ' this time he slices this along the ground to deep cover-point'], ['16.3', 'Ferguson to Miller', ' four', ' this is class batting', ' knows third man is inside the ring', ' as soon as Ferguson dropped the slower ball short', ' Miller was there to just guide in the gap wide of backward point'], ['16.4', 'Ferguson to Miller', ' 1 run', ' short slower delivery', ' Miller swivels and helps it to short fine leg'], ['16.5', 'Ferguson to Mandeep', ' 2 runs', ' friendly full toss', ' but Mandeep has mistimed this drive', ' chips it over to deep cover'], ['16.6', 'Ferguson to Mandeep', ' 1 run', ' oh this looked funny! Mandeep was attempting the pull shot through mid-wicket', " ended up slicing it hard through point because of Ferguson's extra pace"], ['17.1', 'Prasidh to Mandeep', ' no run', ' slower delivery on the shorter side', ' Mandeep plays the pull early and misses'], ['17.2', 'Prasidh to Mandeep', ' 1 run', ' full toss and Mandeep has only hit it straight to extra-cover', ' too much bottom hand there looking to power the ball', ' just needed to time it'], ['17.3', 'Prasidh to Miller', ' FOUR', ' low full toss', ' drilled hard between the sticks and the non-striker', " Dre Russ can't cut it off running from long-off"], ['17.4', 'Prasidh to Miller', ' no run', ' Miller will be kicking himself for missing out on this flick', ' would have normally put that over deep mid-wicket', ' the ball lobbed off the pad'], ['17.5', 'Prasidh to Miller', ' 1 run', ' this is a short delivery that rushed onto Miller', ' the ball takes the splice of the bat and lands safely at mid-wicket', " Kuldeep didn't go for the catch", ' Dre Russ wanted him to sprint and attack the ball. Well', " maybe Kuldeep has the World Cup on his mind. Wouldn't want to dive and injure attempting a catch"], ['17.6', 'Prasidh to Mandeep', ' FOUR', ' clever hit', ' short delivery rising steeply', ' Mandeep stays leg side of the ball and guides it over Karthik for a much needed boundary'], ['18.1', 'Ferguson to Miller', ' wide', ' Ferguson begins with a wide down the leg-side'], ['18.1', 'Ferguson to Miller', ' 1 run', " oh brilliant yorker targetting Miller's boots", ' dug out into the on-side', ' looks like that ball jammed the foot off the bat'], ['18.2', 'Ferguson to Mandeep', ' four', ' short delivery outside off stump', ' Mandeep stays back and cuts past backward point', " third man doesn't have a real go. Fours won't do it for KXIP"], ['18.3', 'Ferguson to Mandeep', ' 1 run', ' very full and outside off stump', ' Mandeep drills it hard', ' Ferguson gets a hand on it and the ball rolls towards mid-off'], ['18.4', 'Ferguson to Miller', ' 2 runs', ' slower delivery on the leg stump', ' tucked away towards mid-wicket', ' easy two. Fifty up for Miller', ' but no celebrations'], ['18.5', 'Ferguson to Miller', ' SIX', ' now then', ' KXIP need seven more of these. But hey', ' this bloke has backed away to this full ball and somehow sliced this ball over backward point', ' normally you see the ball travel over cover', ' incredible hit'], ['18.6', 'Ferguson to Miller', ' no run', ' slower delivery', ' beaten and Miller grunts'], ['19.1', 'Chawla to Mandeep', ' four', ' short googly', ' pulled away to deep mid-wicket', ' Uthappa runs to his right', ' gets to the ball but fumbles as he tries to hop and stop the ball'], ['19.2', 'Chawla to Mandeep', ' 2 runs', ' googly again', ' Mandeep works it to mid-wicket and returns for the second'], ['19.3', 'Chawla to Mandeep', ' FOUR', ' Chawla is only going to bowl googlies', ' so Mandeep moves across and scoops the ball over Lynn at short fine leg'], ['19.4', 'Chawla to Mandeep', ' 1 run', ' quicker delivery on the stumps', ' Mandeep flicks it to long-on'], ['19.5', 'Chawla to Miller', ' 2 runs', ' short and spinning away outside off stump', ' Miller cuts it to deep point'], ['19.6', 'Chawla to Miller', ' no run', ' short ball', ' Miller cuts but finds the man at cover', ' KKR win by 28 runs']]
# finding unique batsman and ballers
batsman = list(dict.fromkeys(batsman))
ballers = list(dict.fromkeys(ballers))
print(batsman)
print(ballers)
[' Rahul', ' Gayle', ' Agarwal', ' Sarfaraz Khan', ' Miller', ' Mandeep'] ['Prasidh ', 'Ferguson ', 'A Russell ', 'Kuldeep Yadav ', 'Narine ', 'Chawla ']
import pandas as pd
# making batsman dataFrame using pandas
myBatsman = pd.DataFrame(0, batsman, ['status', 'R', 'B', '4s', '6s', 'SR'])
myBatsman['status'] = 'not out'
myBatsman
status | R | B | 4s | 6s | SR | |
---|---|---|---|---|---|---|
Rahul | not out | 0 | 0 | 0 | 0 | 0 |
Gayle | not out | 0 | 0 | 0 | 0 | 0 |
Agarwal | not out | 0 | 0 | 0 | 0 | 0 |
Sarfaraz Khan | not out | 0 | 0 | 0 | 0 | 0 |
Miller | not out | 0 | 0 | 0 | 0 | 0 |
Mandeep | not out | 0 | 0 | 0 | 0 | 0 |
myBatsman.loc[' Miller','status']
'not out'
# making dataFrame for ballers
myBallers = pd.DataFrame(0, ballers, ['O', 'M', 'R', 'W', 'NB', 'WD', 'EC' , 'B'])
myBallers
O | M | R | W | NB | WD | EC | B | |
---|---|---|---|---|---|---|---|---|
Prasidh | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Ferguson | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
A Russell | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Kuldeep Yadav | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Narine | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Chawla | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
extra = 0
wide = 0
score = 0
wickets = 0
noBall = 0
b = 0
lb = 0
fall = []
for i in range(lx):
ball_no = line[i][0]
players = line[i][1].split('to')
batsmanName = players[1]
ballerName = players[0]
# print(ball_no)
# print(ballerName)
# print(batsmanName)
line[i][2] = line[i][2].lower()
# print(line[i][2])
# If ball is wide
if line[i][2] == ' wide':
wide = wide + 1
score = score +1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 1
myBallers.loc[ballerName,'WD'] = myBallers.loc[ballerName,'WD'] + 1
# If ball is no ball
elif line[i][2] == ' no ball':
noball = noball + 1
score = score +1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 1
myBallers.loc[ballerName,'NB'] = myBallers.loc[ballerName,'NB'] + 1
# If ball is legal and 4 runs
elif line[i][2] == ' four' or line[i][2] == ' 4' or line[i][2] == ' 4 runs':
myBatsman.loc[batsmanName,'4s'] = myBatsman.loc[batsmanName,'4s'] + 1
myBatsman.loc[batsmanName,'R'] = myBatsman.loc[batsmanName,'R'] + 4
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 4
score = score +4
# If ball is legal and 6 runs
elif line[i][2] == ' six' or line[i][2] == ' 6' or line[i][2] == ' 6 runs':
myBatsman.loc[batsmanName,'6s'] = myBatsman.loc[batsmanName,'6s'] + 1
myBatsman.loc[batsmanName,'R'] = myBatsman.loc[batsmanName,'R'] + 6
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 6
score = score +6
# If ball is legal and 1 runs
elif line[i][2] == ' 1 run' or line[i][2] == ' 1':
myBatsman.loc[batsmanName,'R'] = myBatsman.loc[batsmanName,'R'] + 1
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 1
score = score +1
# If ball is legal and 2 runs
elif line[i][2] == ' 2 runs' or line[i][2] == ' 2 run' or line[i][2] == ' 2':
myBatsman.loc[batsmanName,'R'] = myBatsman.loc[batsmanName,'R'] + 2
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 2
score = score +2
# If ball is legal and 3 runs
elif line[i][2] == ' 3 runs' or line[i][2] == ' 3 run' or line[i][2] == ' 3':
myBatsman.loc[batsmanName,'R'] = myBatsman.loc[batsmanName,'R'] + 3
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 3
score = score +3
# If ball is legal and 5 runs
elif line[i][2] == ' 5 runs' or line[i][2] == ' 5 run' or line[i][2] == ' 5':
myBatsman.loc[batsmanName,'R'] = myBatsman.loc[batsmanName,'R'] + 5
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 5
score = score +5
# If ball is legal and no runs
elif line[i][2] == ' no run' or line[i][2] == ' no':
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
# If ball is legal and leg byes
elif line[i][2] == ' leg byes' or line[i][2] == ' leg bye' or line[i][2] == ' lb':
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
if line[i][3] == ' four' or line[i][3] == ' 4' or line[i][3] == ' 4 runs':
lb = lb + 4
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 4
score = score +4
if line[i][3] == ' six' or line[i][3] == ' 6' or line[i][3] == ' 6 runs':
lb = lb + 6
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 6
score = score +6
if line[i][3] == ' 1 run' or line[i][3] == ' 1':
lb = lb + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 1
score = score +1
if line[i][3] == ' 2 runs' or line[i][3] == ' 2 run' or line[i][3] == ' 2':
lb = lb + 2
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 2
score = score +2
if line[i][3] == ' 3 runs' or line[i][3] == ' 3 run' or line[i][3] == ' 3':
lb = lb + 3
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 3
score = score +3
if line[i][3] == ' 5 runs' or line[i][3] == ' 5 run' or line[i][3] == ' 5':
lb = lb + 5
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 5
score = score +5
# If ball is legal and bye
elif line[i][2] == ' byes' or line[i][2] == ' bye':
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 1
if line[i][3] == ' four' or line[i][3] == ' 4' or line[i][3] == ' 4 runs':
b = b + 4
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 4
score = score +4
if line[i][3] == ' six' or line[i][3] == ' 6' or line[i][3] == ' 6 runs':
b = b + 6
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 6
score = score +6
if line[i][3] == ' 1 run' or line[i][3] == ' 1':
b = b + 1
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 1
score = score +1
if line[i][3] == ' 2 runs' or line[i][3] == ' 2 run' or line[i][3] == ' 2':
b = b + 2
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 2
score = score +2
if line[i][3] == ' 3 runs' or line[i][3] == ' 3 run' or line[i][3] == ' 3':
b = b + 3
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 3
score = score +3
if line[i][3] == ' 5 runs' or line[i][3] == ' 5 run' or line[i][3] == ' 5':
b = b + 5
myBallers.loc[ballerName,'R'] = myBallers.loc[ballerName,'R'] + 5
score = score +5
# If ball is legal and out
else:
myBatsman.loc[batsmanName,'B'] = myBatsman.loc[batsmanName,'B'] + 1
myBallers.loc[ballerName,'B'] = myBallers.loc[ballerName,'B'] + 1
add = str(score) + '-' + str(wickets) + '('+ batsmanName + ',' + ball_no + ')'
fall.append(add)
content = line[i][2].split('!')
print(content[0])
if content[0] == ' out bowled':
myBatsman.loc[batsmanName,'status'] = 'b ' + ballerName
myBallers.loc[ballerName,'W'] = myBallers.loc[ballerName,'W'] + 1
wickets = wickets +1
elif content[0] == ' run out':
myBatsman.loc[batsmanName,'status'] = 'run out'
wickets = wickets +1
else:
content2 = content[0].split('by')
myBatsman.loc[batsmanName,'status'] = 'c ' + content2[1] + ' b ' + ballerName
myBallers.loc[ballerName,'W'] = myBallers.loc[ballerName,'W'] + 1
wickets = wickets +1
myBatsman.loc[batsmanName,'SR'] = int((myBatsman.loc[batsmanName,'R'] / myBatsman.loc[batsmanName,'B']) * 100)
myBallers.loc[ballerName,'O'] = myBallers.loc[ballerName,'B']/6
myBallers.loc[ballerName,'EC'] = myBallers.loc[ballerName,'R']/myBallers.loc[ballerName,'O']
out caught by kuldeep yadav out caught by prasidh out caught by karthik out bowled
myBatsman
status | R | B | 4s | 6s | SR | |
---|---|---|---|---|---|---|
Rahul | c kuldeep yadav b Ferguson | 1 | 5 | 0 | 0 | 20 |
Gayle | c prasidh b A Russell | 20 | 13 | 2 | 2 | 153 |
Agarwal | b Chawla | 58 | 34 | 6 | 1 | 170 |
Sarfaraz Khan | c karthik b A Russell | 13 | 13 | 2 | 0 | 100 |
Miller | not out | 59 | 40 | 5 | 3 | 147 |
Mandeep | not out | 33 | 15 | 4 | 1 | 220 |
myBallers
O | M | R | W | NB | WD | EC | B | |
---|---|---|---|---|---|---|---|---|
Prasidh | 4.0 | 0 | 42 | 0 | 0 | 1 | 10.5 | 24 |
Ferguson | 4.0 | 0 | 42 | 1 | 0 | 2 | 10.5 | 24 |
A Russell | 3.0 | 0 | 21 | 2 | 0 | 0 | 7.0 | 18 |
Kuldeep Yadav | 4.0 | 0 | 32 | 0 | 0 | 2 | 8.0 | 24 |
Narine | 2.0 | 0 | 26 | 0 | 0 | 0 | 13.0 | 12 |
Chawla | 3.0 | 0 | 27 | 1 | 0 | 0 | 9.0 | 18 |
# calculating total extras
extra =lb + b + noBall + wide
print('SCORECARD')
print(myBatsman)
print('\nExtras\t\t'+ str(extra) + '(b ' + str(b) +', lb '+ str(lb) +', w '+ str(wide) +', nb '+ str(noBall) + ')')
print('\nTotal\t\t'+ str(score) + ' ('+ str(wickets)+ ' wkts, '+ str(myBallers['O'].sum()) +' Ov)\n' )
print(*fall, sep=' ')
print('\n')
print(myBallers.iloc[:,:-1])
SCORECARD status R B 4s 6s SR Rahul c kuldeep yadav b Ferguson 1 5 0 0 20 Gayle c prasidh b A Russell 20 13 2 2 153 Agarwal b Chawla 58 34 6 1 170 Sarfaraz Khan c karthik b A Russell 13 13 2 0 100 Miller not out 59 40 5 3 147 Mandeep not out 33 15 4 1 220 Extras 6(b 0, lb 1, w 5, nb 0) Total 190 (4 wkts, 20.0 Ov) 11-0( Rahul,1.4) 37-1( Gayle,4.2) 60-2( Sarfaraz Khan,7.3) 134-3( Agarwal,15.2) O M R W NB WD EC Prasidh 4.0 0 42 0 0 1 10.5 Ferguson 4.0 0 42 1 0 2 10.5 A Russell 3.0 0 21 2 0 0 7.0 Kuldeep Yadav 4.0 0 32 0 0 2 8.0 Narine 2.0 0 26 0 0 0 13.0 Chawla 3.0 0 27 1 0 0 9.0