generated from allenai/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58bdfa5
commit 08f7612
Showing
3 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div>\n", | ||
"<style scoped>\n", | ||
" .dataframe tbody tr th:only-of-type {\n", | ||
" vertical-align: middle;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe tbody tr th {\n", | ||
" vertical-align: top;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe thead th {\n", | ||
" text-align: right;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<table border=\"1\" class=\"dataframe\">\n", | ||
" <thead>\n", | ||
" <tr style=\"text-align: right;\">\n", | ||
" <th></th>\n", | ||
" <th>url</th>\n", | ||
" <th>page_number</th>\n", | ||
" <th>response</th>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>id</th>\n", | ||
" <th></th>\n", | ||
" <th></th>\n", | ||
" <th></th>\n", | ||
" </tr>\n", | ||
" </thead>\n", | ||
" <tbody>\n", | ||
" <tr>\n", | ||
" <th>c6b0a0a792c8b9d789ca640885e5c27062b0dcca-10</th>\n", | ||
" <td>http://www.research.ed.ac.uk/portal/files/4213...</td>\n", | ||
" <td>10</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>c6b0a0a792c8b9d789ca640885e5c27062b0dcca-9</th>\n", | ||
" <td>http://www.research.ed.ac.uk/portal/files/4213...</td>\n", | ||
" <td>9</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>c6b0a0a792c8b9d789ca640885e5c27062b0dcca-3</th>\n", | ||
" <td>http://www.research.ed.ac.uk/portal/files/4213...</td>\n", | ||
" <td>3</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>a12049cb0a97a037ddcf1b59c75388ac6a961d0a-2</th>\n", | ||
" <td>https://hal.archives-ouvertes.fr/hal-01518465/...</td>\n", | ||
" <td>2</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>a12049cb0a97a037ddcf1b59c75388ac6a961d0a-8</th>\n", | ||
" <td>https://hal.archives-ouvertes.fr/hal-01518465/...</td>\n", | ||
" <td>8</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>...</th>\n", | ||
" <td>...</td>\n", | ||
" <td>...</td>\n", | ||
" <td>...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>6ca9ff4bd92da89149bf2734f79e3d7f84079090-49</th>\n", | ||
" <td>https://publications.parliament.uk/pa/ld201415...</td>\n", | ||
" <td>49</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>6ca9ff4bd92da89149bf2734f79e3d7f84079090-46</th>\n", | ||
" <td>https://publications.parliament.uk/pa/ld201415...</td>\n", | ||
" <td>46</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>6ca9ff4bd92da89149bf2734f79e3d7f84079090-32</th>\n", | ||
" <td>https://publications.parliament.uk/pa/ld201415...</td>\n", | ||
" <td>32</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>73c0ecd2b6e4e762244adf8b45b041c700b4f26d-3</th>\n", | ||
" <td>http://ajpendo.physiology.org/content/ajpendo/...</td>\n", | ||
" <td>3</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>73c0ecd2b6e4e762244adf8b45b041c700b4f26d-1</th>\n", | ||
" <td>http://ajpendo.physiology.org/content/ajpendo/...</td>\n", | ||
" <td>1</td>\n", | ||
" <td>{\"primary_language\":\"en\",\"is_rotation_valid\":t...</td>\n", | ||
" </tr>\n", | ||
" </tbody>\n", | ||
"</table>\n", | ||
"<p>1166 rows × 3 columns</p>\n", | ||
"</div>" | ||
], | ||
"text/plain": [ | ||
" url \\\n", | ||
"id \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-10 http://www.research.ed.ac.uk/portal/files/4213... \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-9 http://www.research.ed.ac.uk/portal/files/4213... \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-3 http://www.research.ed.ac.uk/portal/files/4213... \n", | ||
"a12049cb0a97a037ddcf1b59c75388ac6a961d0a-2 https://hal.archives-ouvertes.fr/hal-01518465/... \n", | ||
"a12049cb0a97a037ddcf1b59c75388ac6a961d0a-8 https://hal.archives-ouvertes.fr/hal-01518465/... \n", | ||
"... ... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-49 https://publications.parliament.uk/pa/ld201415... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-46 https://publications.parliament.uk/pa/ld201415... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-32 https://publications.parliament.uk/pa/ld201415... \n", | ||
"73c0ecd2b6e4e762244adf8b45b041c700b4f26d-3 http://ajpendo.physiology.org/content/ajpendo/... \n", | ||
"73c0ecd2b6e4e762244adf8b45b041c700b4f26d-1 http://ajpendo.physiology.org/content/ajpendo/... \n", | ||
"\n", | ||
" page_number \\\n", | ||
"id \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-10 10 \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-9 9 \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-3 3 \n", | ||
"a12049cb0a97a037ddcf1b59c75388ac6a961d0a-2 2 \n", | ||
"a12049cb0a97a037ddcf1b59c75388ac6a961d0a-8 8 \n", | ||
"... ... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-49 49 \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-46 46 \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-32 32 \n", | ||
"73c0ecd2b6e4e762244adf8b45b041c700b4f26d-3 3 \n", | ||
"73c0ecd2b6e4e762244adf8b45b041c700b4f26d-1 1 \n", | ||
"\n", | ||
" response \n", | ||
"id \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-10 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-9 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"c6b0a0a792c8b9d789ca640885e5c27062b0dcca-3 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"a12049cb0a97a037ddcf1b59c75388ac6a961d0a-2 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"a12049cb0a97a037ddcf1b59c75388ac6a961d0a-8 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"... ... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-49 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-46 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"6ca9ff4bd92da89149bf2734f79e3d7f84079090-32 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"73c0ecd2b6e4e762244adf8b45b041c700b4f26d-3 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"73c0ecd2b6e4e762244adf8b45b041c700b4f26d-1 {\"primary_language\":\"en\",\"is_rotation_valid\":t... \n", | ||
"\n", | ||
"[1166 rows x 3 columns]" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"import pandas\n", | ||
"\n", | ||
"with open(\"eval-s2pdf.parquet\", \"rb\") as f:\n", | ||
" df = pandas.read_parquet(f)\n", | ||
"\n", | ||
"df" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "pdf", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |