Very basic question.
I’m a newbie to python here and had a question with some syntax. I’ve noticed two different ways of running commands on data in Python.
In one the location is specified first and then the command is run. In other words going from left to right you first specify the location and then the function that is to be run. For example:
CustomerBasicInfo['MeatLikelyhood'].plot.hist()
In this I would say that the location is:
CustomerBasicInfo['MeatLikelyhood'].
And the function is:
plot.hist()
However, alternatively there are certain scenarios in which the the function comes first and the location is specified later. For example:
sum(DfPayments['Amount'])
The function sums is first followed by the location
(DfPayments['Amount’])
I was just wondering why this is so. And if this is because I'm overlooking something can you please tell me what I can read to brush up on my theory?
Regards