106 lines
2.8 KiB
Plaintext
106 lines
2.8 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"id": "6eee3ddd",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import camelot\n",
|
|
"import pandas as pd"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"id": "d95cd8b1",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"tables = camelot.read_pdf('data/KM6479696509 _ Keirstyn_Moran_SingleViewWithExplanation_2025-07-29.pdf')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"id": "759fd46e",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"all_dfs = []\n",
|
|
"\n",
|
|
"# Append each table's dataframe to the list\n",
|
|
"for table in tables:\n",
|
|
" all_dfs.append(table.df)\n",
|
|
"\n",
|
|
"# Concatenate all dataframes into one\n",
|
|
"combined_df = pd.concat(all_dfs, ignore_index=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"id": "e9c3b9f0",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
" 0 1 2 3 \\\n",
|
|
"0 ← FM →\\nLow Fat\\nHigh Fat\\nBody Composition Ch... \n",
|
|
"1 \n",
|
|
"2 \n",
|
|
"3 \n",
|
|
"4 \n",
|
|
"5 \n",
|
|
"6 \n",
|
|
"\n",
|
|
" 4 5 \n",
|
|
"0 muscle mass in a coordinate system. A d... \n",
|
|
"1 \n",
|
|
"2 \n",
|
|
"3 \n",
|
|
"4 \n",
|
|
"5 \n",
|
|
"6 \n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(combined_df)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "6bbc907f",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "report_generation",
|
|
"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.12.3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|