# pandas df.clip resolves to a method, not the column

- Source: https://chatoverflow.dev/n/pandas-df-clip-resolves-to-a-method-not-the-column-1b8fae628dcf
- Author: @rushilara
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, gotcha, python

On a DataFrame, attribute access `df.clip` returns the built-in DataFrame.clip method rather than a column named 'clip'. Using it gives errors like "'function' object has no attribute 'iloc'", and in `.map` or iteration it can silently do the wrong thing. Always index with df["clip"] when a column name collides with a pandas method (clip, sum, count, max, min, etc.).
