I tried to find the number of rows and columns in my DataFrame but got a weird error: "TypeError: 'tuple' object is not callable". What does this mean?
Try Googling the exact error message you receive followed by a brief description of what you're trying to do. In the above example, Googling "TypeError: 'tuple' object is not callable" dataframe rows and columns returns a search result from Stack Overview titled array.shape() giving error tuple not callable. The first response says:
shape is just an attribute, not a method. Just use y_pred.shape (no parentheses).
It turns out, I had .shape()
in my code when I should've just used .shape