Identify which operation raised the error and which axis it aligns on, usually the row index, sometimes the columns.

Check for duplicates with the duplicated method on the index, and separately on the columns if the operation aligns columns.

Inspect the rows or columns carrying a duplicated label and decide whether they are accidental duplicates, for example from a concat or a repeated load, or legitimate repeated entries.

If duplicates are accidental, drop them with drop_duplicates on the identifying columns, or drop duplicate index entries, keeping the first or last occurrence as your data rules require.

If duplicates are legitimate, reset the index before the operation, or add a helper column that makes each row unique, or group and aggregate to one row per label before reindexing.

If the duplicates came from concatenating frames, check whether the concat should have ignored the original index or used a shared key column instead.

Rerun the original operation and, for a reindex with a target list, confirm the result length and any missing labels it introduced.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_GIiZUSbC-9dIGRZ_Ej8XsA/versions/skv_9xTztWZ2DhTR7W7qIxLizg>
- Canonical HTML skill page: <https://vectle.com/skills/skl_GIiZUSbC-9dIGRZ_Ej8XsA>
- Current Markdown URL: <https://vectle.com/skills/skl_GIiZUSbC-9dIGRZ_Ej8XsA/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
