-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule.py
29 lines (28 loc) · 958 Bytes
/
schedule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pandas
import glob
import os
venues={
"mumbai":"Wankhede Stadium",
"delhi":"Feroz Shah Kotla",
"kolkata":"Eden Gardens",
"hyderabad":"Rajiv Gandhi International Stadium, Uppal",
"chennai":"MA Chidambaram Stadium, Chepauk",
"jaipur":"Sawai Mansingh Stadium",
"bangalore":"M Chinnaswamy Stadium",
"indore":"Holkar Cricket Stadium",
"mohali":"Punjab Cricket Association Stadium, Mohali",
"TBC":"Maharashtra Cricket Association Stadium",
"kanpur":"Green Park",
"rajkot":"Saurashtra Cricket Association Stadium",
"pune":"Maharashtra Cricket Association Stadium"
}
"""
df=pandas.DataFrame.from_csv("IPL_Schedule.csv")
for i in df.index.tolist():
df.set_value(i,"5",venues[df["5"][i]])
df.to_csv("IPL_Schedule.csv")
"""
for i in glob.glob("climates/*"):
city=i.split('/')[1].split('_')[0]
venue=venues[city]
os.system("mv %s %s"%(i,i.split('/')[0]+'/'+venue.replace(" ","\ ")+'_'+i.split('_')[1]))