Code added to save anomilities
This commit is contained in:
parent
ad371f6584
commit
2817490652
|
|
@ -601,10 +601,33 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Excel file 'C:\\data\\aus_prospectus\\output\\error_analysis\\anomilities_found.xlsx' has been created successfully.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# Convert data to DataFrame\n",
|
||||
"df = pd.DataFrame(message_list)\n",
|
||||
"\n",
|
||||
"# Sort DataFrame by 'doc_id'\n",
|
||||
"df_sorted = df.sort_values(by=['doc_id'])\n",
|
||||
"\n",
|
||||
"# Save DataFrame to Excel file\n",
|
||||
"output_filename = r\"C:\\data\\aus_prospectus\\output\\error_analysis\\anomilities_found.xlsx\"\n",
|
||||
"df_sorted.to_excel(output_filename, index=False)\n",
|
||||
"\n",
|
||||
"print(f\"Excel file '{output_filename}' has been created successfully.\")\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
|
|
|
|||
Loading…
Reference in New Issue