Skip to content

Commit

Permalink
indentation update top_managers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielIlaro committed Sep 13, 2020
1 parent 8b9b5e6 commit a4d37e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions top_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# number of GW in 2019/20 season. Done as array to avoid calling api for blank GW 30-38.
gameWeeks = [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,39,40,
41,42,43,44,45,46,47]
41,42,43,44,45,46,47]

# adds the top 10 team ID's to this array
teamIDarray = []
Expand Down Expand Up @@ -41,7 +41,7 @@

if count <= topManagerNumber:
csvwriter1.writerow([manager['rank'],manager['entry'],manager['player_name'],
manager['entry_name'],manager['total']])
manager['entry_name'],manager['total']])

count +=1
teamIDarray.append(manager['entry'])
Expand All @@ -59,15 +59,15 @@
# write data to top_managers_gwInfo.csv
if count1 == 0:
header = ['team_id','gw','points','bench','gw_rank','transfers','hits','total_points',
'overall_ank','team_value','chip']
'overall_ank','team_value','chip']

csvwriter2.writerow(header)
count1 += 1
try:
csvwriter2.writerow([teamID,x, parsed['entry_history']['points'], parsed['entry_history']['points_on_bench'],
parsed['entry_history']['rank'], parsed['entry_history']['event_transfers'],
parsed['entry_history']['event_transfers_cost'], parsed['entry_history']['total_points'],
parsed['entry_history']['overall_rank'], int(parsed['entry_history']['value'])/10, parsed['active_chip']])
parsed['entry_history']['rank'], parsed['entry_history']['event_transfers'],
parsed['entry_history']['event_transfers_cost'], parsed['entry_history']['total_points'],
parsed['entry_history']['overall_rank'], int(parsed['entry_history']['value'])/10, parsed['active_chip']])
except:
continue

Expand Down

0 comments on commit a4d37e8

Please sign in to comment.