0

Could someone please explain to me why the output complete changes when you forget the (), i.e this is the correct minimum:

data['PRICE'].min()

5.0

...and this is the output when you forget to use parentheses. How could this be interpretted?

data['PRICE'].min
​

<bound method Series.min of 0      24.0
1      21.6
2      34.7
3      33.4
4      36.2
       ... 
501    22.4
502    20.6
503    23.9
504    22.0
505    11.9
Name: PRICE, Length: 506, dtype: float64>

attached image example

python_user
  • 5,375
  • 2
  • 13
  • 32
beth
  • 13
  • 1
  • `bound method Series` when you type a method without calling it in jupyer notebook it will tell you something about the method, usually bound method something something which is what you are getting here – Nullman Nov 06 '21 at 14:41

1 Answers1

0

Functions in Python are also Objects. By using parentheses you call the function. Without parentheses you just return the object instead. See also: https://stackoverflow.com/a/21786508/1618893

Roman Purgstaller
  • 910
  • 3
  • 11
  • 24