Spaces:
Runtime error
Runtime error
felix
commited on
Commit
·
b68ba51
1
Parent(s):
9361aa3
fix
Browse files
app.py
CHANGED
@@ -180,8 +180,9 @@ def display(x, y):
|
|
180 |
original_df[column] = original_df[column].apply(remove_invalid_unicode)
|
181 |
|
182 |
subset_df = original_df[COLS]
|
183 |
-
|
184 |
-
|
|
|
185 |
print(first_50_rows.to_string())
|
186 |
json_data = first_50_rows.to_json(orient='records')
|
187 |
print(json_data) # Print JSON representation
|
|
|
180 |
original_df[column] = original_df[column].apply(remove_invalid_unicode)
|
181 |
|
182 |
subset_df = original_df[COLS]
|
183 |
+
with open('output.json', 'w') as file:
|
184 |
+
file.write(subset_df.to_json(orient='records'))
|
185 |
+
first_50_rows = subset_df.head(20)
|
186 |
print(first_50_rows.to_string())
|
187 |
json_data = first_50_rows.to_json(orient='records')
|
188 |
print(json_data) # Print JSON representation
|