jethrovic commited on
Commit
af8cb69
·
1 Parent(s): 6efd3ee

Update app.py

Browse files

tabular reaarangement make header first row

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -18,6 +18,9 @@ question = st.text_input("Enter your question:")
18
  if uploaded_file is not None and question:
19
  # Read table from CSV
20
  table = pd.read_csv(uploaded_file)
 
 
 
21
 
22
  # Display the table
23
  st.write("Uploaded Table:")
 
18
  if uploaded_file is not None and question:
19
  # Read table from CSV
20
  table = pd.read_csv(uploaded_file)
21
+ new_header = table.iloc[0] #grab the first row for the header
22
+ table = table[1:] #take the data less the header row
23
+ table.columns = new_header
24
 
25
  # Display the table
26
  st.write("Uploaded Table:")