Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,10 @@ async def get_first_rows(dataset: str, config: str, split: str) -> Dict[str, Dic
|
|
28 |
|
29 |
def get_df_from_rows(api_output):
|
30 |
dfFromSort = pd.DataFrame([row["row"] for row in api_output["rows"]])
|
31 |
-
|
|
|
|
|
|
|
32 |
return dfFromSort
|
33 |
|
34 |
async def update_configs(dataset_name: str):
|
|
|
28 |
|
29 |
def get_df_from_rows(api_output):
|
30 |
dfFromSort = pd.DataFrame([row["row"] for row in api_output["rows"]])
|
31 |
+
try:
|
32 |
+
dfFromSort.sort_values(by=0, axis=0, ascending=False, inplace=False, kind='mergesort', na_position='last', ignore_index=False, key=None)
|
33 |
+
except:
|
34 |
+
print("Exception sorting due to keyerror?")
|
35 |
return dfFromSort
|
36 |
|
37 |
async def update_configs(dataset_name: str):
|