Spaces:
Running
Running
Andrea Seveso
commited on
Commit
•
db04e35
1
Parent(s):
f574033
One level dataframe
Browse files
app.py
CHANGED
@@ -137,12 +137,14 @@ def get_macro_area_data():
|
|
137 |
|
138 |
def get_question_format_data():
|
139 |
dataset = pd.read_csv("src/question_format.csv", sep=',')
|
140 |
-
top_level_headers =
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
dataset
|
|
|
|
|
146 |
|
147 |
# dataset = dataset.style.highlight_max(color='lightgreen', axis=0)
|
148 |
return dataset
|
|
|
137 |
|
138 |
def get_question_format_data():
|
139 |
dataset = pd.read_csv("src/question_format.csv", sep=',')
|
140 |
+
top_level_headers = [
|
141 |
+
int(float(x)) if '.' in x else x for x in dataset.columns]
|
142 |
+
second_level_headers = dataset.iloc[0]
|
143 |
+
columns = [f'{x} - {y}' for x,
|
144 |
+
y in zip(top_level_headers, second_level_headers)]
|
145 |
+
dataset = dataset.iloc[2:]
|
146 |
+
columns[0] = 'Model'
|
147 |
+
dataset.columns = columns
|
148 |
|
149 |
# dataset = dataset.style.highlight_max(color='lightgreen', axis=0)
|
150 |
return dataset
|