James McCool
commited on
Commit
·
1e8df5a
1
Parent(s):
fd9eb32
Update lineup processing in `load_file.py` to accommodate additional player entries
Browse files- Increased the range in the loop for splitting the `Lineup` column from 10 to 11, allowing for the extraction of an additional player entry, thereby enhancing the accuracy of lineup data processing.
- global_func/load_file.py +1 -1
global_func/load_file.py
CHANGED
@@ -27,7 +27,7 @@ def load_file(upload):
|
|
27 |
df['Lineup'] = df['Lineup'].str.replace(r'\b(' + '|'.join(pos_values) + r')\b', r'\1,', regex=True)
|
28 |
|
29 |
# Split into individual columns and remove position indicators
|
30 |
-
for i in range(0,
|
31 |
df[i] = df['Lineup'].str.split(',').str[i].str.strip()
|
32 |
# Remove position indicators from the end of each entry
|
33 |
df[i] = df[i].str.replace(r'\s+(' + '|'.join(pos_values) + r')$', '', regex=True)
|
|
|
27 |
df['Lineup'] = df['Lineup'].str.replace(r'\b(' + '|'.join(pos_values) + r')\b', r'\1,', regex=True)
|
28 |
|
29 |
# Split into individual columns and remove position indicators
|
30 |
+
for i in range(0,11):
|
31 |
df[i] = df['Lineup'].str.split(',').str[i].str.strip()
|
32 |
# Remove position indicators from the end of each entry
|
33 |
df[i] = df[i].str.replace(r'\s+(' + '|'.join(pos_values) + r')$', '', regex=True)
|