title: How do i get the sum of a column based on the user input of that particular column in pandas
body: <p>my code to calculate the sum of a column:</p>
  <pre><code>import json
  import requests
  import pandas as pd
  def get_additonal_data():
      import pandas as pd
      file_path = '/Users/CIS5357/Assignments/'
      data = file_path + 'grades.csv'
      df_grades = pd.read_csv(data)
      print (df_grades)
      return df_grades
  
  def do_functions(df_grades):
      import pandas as pd
      user_input_grade = input(str(&quot;enter the grade: &quot;))
      Print_grades =  df_grades.at[user_input_grade].sum()
      print(Print_grades)
  
  df_grades = get_additonal_data()
  do_functions(df_grades)
  </code></pre>