0

I am trying to put a condition to print the revenue which is greater or equal to certain number using Pandas in Python.

I am using the code line" df[df.Total Revenue>=6678690.38]"

I am getting the error "SyntaxError: invalid syntax." beacuse its not taking my column name(Total Revenue) with space. So how to read column if the column header is with space?

Note = df is where I am reading my file

john
  • 1
  • 1

1 Answers1

0

this should work

df[df['Total Revenue']>=6678690.38]
  • Hi , Tried your suggestion but still got the same error "SyntaxError: invalid syntax. Perhaps you forgot a comma?" – john Apr 20 '22 at 10:26