James McCool
commited on
Commit
·
a37d3b8
1
Parent(s):
5c9b782
Add display of top entries in load_contest_file function
Browse files- Included a Streamlit write statement to display the first 10 rows of the DataFrame after loading contest data.
- This enhancement improves user feedback by allowing users to quickly preview the loaded data.
global_func/load_contest_file.py
CHANGED
@@ -19,6 +19,8 @@ def load_contest_file(upload, sport):
|
|
19 |
|
20 |
df = raw_df[['EntryId', 'EntryName', 'TimeRemaining', 'Points', 'Lineup', 'Player', 'Roster Position', '%Drafted', 'FPTS']]
|
21 |
df = df.rename(columns={'Roster Position': 'Pos', '%Drafted': 'Own'})
|
|
|
|
|
22 |
|
23 |
# Split EntryName into base name and entry count
|
24 |
df['BaseName'] = df['EntryName'].str.replace(r'\s*\(\d+/\d+\)$', '', regex=True)
|
|
|
19 |
|
20 |
df = raw_df[['EntryId', 'EntryName', 'TimeRemaining', 'Points', 'Lineup', 'Player', 'Roster Position', '%Drafted', 'FPTS']]
|
21 |
df = df.rename(columns={'Roster Position': 'Pos', '%Drafted': 'Own'})
|
22 |
+
|
23 |
+
st.write(df.head(10))
|
24 |
|
25 |
# Split EntryName into base name and entry count
|
26 |
df['BaseName'] = df['EntryName'].str.replace(r'\s*\(\d+/\d+\)$', '', regex=True)
|