James McCool
commited on
Commit
·
19bd3e1
1
Parent(s):
b9fc1be
Refactor salary processing in app.py: improve clarity by separating character replacements for salary values into distinct operations, ensuring consistent formatting during projections file loading.
Browse files
app.py
CHANGED
@@ -140,7 +140,7 @@ with tab1:
|
|
140 |
export_projections, projections = load_file(projections_file)
|
141 |
if projections is not None:
|
142 |
st.success('Projections file loaded successfully!')
|
143 |
-
projections['salary'] = projections['salary'].str.replace(
|
144 |
st.write('replaced salary symbols')
|
145 |
projections = projections.apply(lambda x: x.replace(player_wrong_names_mlb, player_right_names_mlb))
|
146 |
st.dataframe(projections.head(10))
|
|
|
140 |
export_projections, projections = load_file(projections_file)
|
141 |
if projections is not None:
|
142 |
st.success('Projections file loaded successfully!')
|
143 |
+
projections['salary'] = projections['salary'].str.replace(',', '').str.replace('$', '').str.replace(' ', '')
|
144 |
st.write('replaced salary symbols')
|
145 |
projections = projections.apply(lambda x: x.replace(player_wrong_names_mlb, player_right_names_mlb))
|
146 |
st.dataframe(projections.head(10))
|