Search code examples
pythondataframejupyter-notebookmask

IPython-Notebook 'DataFrame' object is not callable'


I am trying to educate myself on Python, IPython notebook, and Data Science taking an online Data Science Course. The first issue, which I could not solve on my own, is that I am trying to use a mask to sort a spreadsheet. However, as you may see in the attached screenshots of a sample data frame and the according mask, I keep receiving the error that "TypeError: 'DataFrame' object is not callable".

Your help is very much appreciated. Thanks, -P

df

mask


Solution

  • You should use square brackets instead of (). [] is used for indexing.

    df[df.Total>0] should work