title: filtering a Pandas dataframe by one column and getting the sum of values in another column
body: <p>I have a dataframe with multiple columns(8-10) and one such column is the year column.i have another column called the arrival column. the year column consists of data from 3 years- 2018,2019 and 2020. i want to find out, for the year 2019, the sum of arrivals. i thought it would be pretty basic but am not getting the right results! could someone show me how to approach this?</p>
  
  <p>I've heard df.loc could be used but am unsure how to approach that.</p>
  
  <p>Current code:</p>
  
  <pre><code>df=pd.read_excel('xyz.xlsx')
  while df['Year'== '2019']:
      arrived= df['Arrived'].sum()
      print(arrived)
  </code></pre>