You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"File \u001B[0;32m~/Applications/anaconda3/envs/PhD_venv/lib/python3.11/site-packages/pandas/_libs/properties.pyx:69\u001B[0m, in \u001B[0;36mpandas._libs.properties.AxisProperty.__set__\u001B[0;34m()\u001B[0m\n",
350
+
"File \u001B[0;32m~/Applications/anaconda3/envs/PhD_venv/lib/python3.11/site-packages/pandas/core/generic.py:730\u001B[0m, in \u001B[0;36mNDFrame._set_axis\u001B[0;34m(self, axis, labels)\u001B[0m\n\u001B[1;32m 725\u001B[0m \u001B[38;5;250m\u001B[39m\u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[1;32m 726\u001B[0m \u001B[38;5;124;03mThis is called from the cython code when we set the `index` attribute\u001B[39;00m\n\u001B[1;32m 727\u001B[0m \u001B[38;5;124;03mdirectly, e.g. `series.index = [1, 2, 3]`.\u001B[39;00m\n\u001B[1;32m 728\u001B[0m \u001B[38;5;124;03m\"\"\"\u001B[39;00m\n\u001B[1;32m 729\u001B[0m labels \u001B[38;5;241m=\u001B[39m ensure_index(labels)\n\u001B[0;32m--> 730\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_mgr\u001B[38;5;241m.\u001B[39mset_axis(axis, labels)\n\u001B[1;32m 731\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_clear_item_cache()\n",
351
+
"File \u001B[0;32m~/Applications/anaconda3/envs/PhD_venv/lib/python3.11/site-packages/pandas/core/internals/managers.py:225\u001B[0m, in \u001B[0;36mBaseBlockManager.set_axis\u001B[0;34m(self, axis, new_labels)\u001B[0m\n\u001B[1;32m 223\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mset_axis\u001B[39m(\u001B[38;5;28mself\u001B[39m, axis: AxisInt, new_labels: Index) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m:\n\u001B[1;32m 224\u001B[0m \u001B[38;5;66;03m# Caller is responsible for ensuring we have an Index object.\u001B[39;00m\n\u001B[0;32m--> 225\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_validate_set_axis(axis, new_labels)\n\u001B[1;32m 226\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39maxes[axis] \u001B[38;5;241m=\u001B[39m new_labels\n",
352
+
"File \u001B[0;32m~/Applications/anaconda3/envs/PhD_venv/lib/python3.11/site-packages/pandas/core/internals/base.py:70\u001B[0m, in \u001B[0;36mDataManager._validate_set_axis\u001B[0;34m(self, axis, new_labels)\u001B[0m\n\u001B[1;32m 67\u001B[0m \u001B[38;5;28;01mpass\u001B[39;00m\n\u001B[1;32m 69\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m new_len \u001B[38;5;241m!=\u001B[39m old_len:\n\u001B[0;32m---> 70\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mValueError\u001B[39;00m(\n\u001B[1;32m 71\u001B[0m \u001B[38;5;124mf\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mLength mismatch: Expected axis has \u001B[39m\u001B[38;5;132;01m{\u001B[39;00mold_len\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m elements, new \u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[1;32m 72\u001B[0m \u001B[38;5;124mf\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mvalues have \u001B[39m\u001B[38;5;132;01m{\u001B[39;00mnew_len\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m elements\u001B[39m\u001B[38;5;124m\"\u001B[39m\n\u001B[1;32m 73\u001B[0m )\n",
353
+
"\u001B[0;31mValueError\u001B[0m: Length mismatch: Expected axis has 0 elements, new values have 1 elements"
0 commit comments