Home > database >  What does the ^ symbol mean when passed into the .where() funtion?
What does the ^ symbol mean when passed into the .where() funtion?

Time:11-20

Could someone please explain what does the ^^^ symbol does when passed into the np.where function?

Video explaining np.where usage with Pandas dataframe

Does it just represents the number of arguments that should be passed in?

CodePudding user response:

Does it just represents the number of arguments that should be passed in?

Yes.

It's being used in this case to point to the first call to np.where.

You can see for yourself:

$ python3
Python 3.9.7 (default, Oct 22 2021, 13:39:39) 

>>> np.where(^^^)
  File "<stdin>", line 1
    np.where(^^^)
             ^
SyntaxError: invalid syntax
  • Related