James McCool
commited on
Commit
·
678dd59
1
Parent(s):
6d04e58
Fix player column creation logic in load_contest_file.py to include all players
Browse files- Updated the loop range for creating player columns to include the maximum number of players, ensuring all player data is processed correctly.
- Enhanced data handling by removing position indicators from player entries, improving data cleanliness.
global_func/load_contest_file.py
CHANGED
@@ -41,7 +41,7 @@ def load_contest_file(upload):
|
|
41 |
return None
|
42 |
|
43 |
# Create columns for each player
|
44 |
-
for i in range(1, max_players
|
45 |
df[i] = df['Lineup'].str.split(',').str[i].str.strip()
|
46 |
# Remove position indicators from the end of each entry
|
47 |
df[i] = df[i].str.replace(r'\s+(' + '|'.join(pos_values) + r')$', '', regex=True)
|
|
|
41 |
return None
|
42 |
|
43 |
# Create columns for each player
|
44 |
+
for i in range(1, max_players):
|
45 |
df[i] = df['Lineup'].str.split(',').str[i].str.strip()
|
46 |
# Remove position indicators from the end of each entry
|
47 |
df[i] = df[i].str.replace(r'\s+(' + '|'.join(pos_values) + r')$', '', regex=True)
|