Spaces:
No application file
No application file
Update test.py
Browse files
test.py
CHANGED
|
@@ -221,3 +221,34 @@ dataframes = tables_to_dataframes(parsed_tables)
|
|
| 221 |
for table_name, df in dataframes.items():
|
| 222 |
print(f"\n{table_name}:\n")
|
| 223 |
print(df)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
for table_name, df in dataframes.items():
|
| 222 |
print(f"\n{table_name}:\n")
|
| 223 |
print(df)
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
The following is a table containing information about people. Please extract the data from the table and output it in a structured format such as JSON, where each row is an object with the corresponding column headers as keys.
|
| 227 |
+
|
| 228 |
+
| Name | Age | Occupation | Country |
|
| 229 |
+
|--------|-----|-------------|-----------|
|
| 230 |
+
| John | 30 | Engineer | USA |
|
| 231 |
+
| Maria | 25 | Doctor | Spain |
|
| 232 |
+
| Ahmed | 40 | Teacher | Egypt |
|
| 233 |
+
|
| 234 |
+
Please structure the output like this:
|
| 235 |
+
[
|
| 236 |
+
{
|
| 237 |
+
"Name": "John",
|
| 238 |
+
"Age": 30,
|
| 239 |
+
"Occupation": "Engineer",
|
| 240 |
+
"Country": "USA"
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"Name": "Maria",
|
| 244 |
+
"Age": 25,
|
| 245 |
+
"Occupation": "Doctor",
|
| 246 |
+
"Country": "Spain"
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"Name": "Ahmed",
|
| 250 |
+
"Age": 40,
|
| 251 |
+
"Occupation": "Teacher",
|
| 252 |
+
"Country": "Egypt"
|
| 253 |
+
}
|
| 254 |
+
]
|