54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pandas\n",
|
|
"\n",
|
|
"df = pandas.read_csv(\"data/cbec-robot-info/robot-name-temu-clear-manual.csv\")\n",
|
|
"\n",
|
|
"# Convert Name column to uppercase\n",
|
|
"df[\"Name\"] = df[\"Name\"].str.upper()\n",
|
|
"\n",
|
|
"# Remove duplicates\n",
|
|
"df = df.drop_duplicates()\n",
|
|
"\n",
|
|
"# Aggregate by Name column\n",
|
|
"df_aggregated = df.groupby(\"Name\").sum().reset_index()\n",
|
|
"\n",
|
|
"# Sort by Day7RunHour column in descending order\n",
|
|
"df_aggregated = df_aggregated.sort_values(by=\"Day7RunHour\", ascending=False)\n",
|
|
"\n",
|
|
"# for index, row in df_aggregated.iterrows():\n",
|
|
"# print(row[\"Name\"], row[\"Day7RunHour\"])\n",
|
|
"\n",
|
|
"df_aggregated.to_excel(\"data/cbec-robot-info/robot-name-temu-clear-manual.xlsx\", index=False)"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"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.10.12"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|