title: Call a range of dates from an API using Python
body: <p>Currently writing a program using an API from MarketStack.com. This is for school, so I am still learning.</p>
  <p>I am writing a stock prediction program using Python on PyCharm and I have written the connection between the program and the API without issues. So, I can certainly get the High, Name, Symbols, etc. What I am trying to do now is call a range of dates. The API says I can call up to 30 years of historical data, so I want to call all 30 years for a date that is entered by the user. Then the program will average the high on that date in order to give a trend prediction.</p>
  <p>So, the problem I am having is calling more than one date. As I said, I want to call all 30 dates, and then I will do the math, etc.</p>
  <p>Can someone help me call a range of dates? I tried installing Pandas and that wasn't being accepted by PyCharm for some reason.. Any help is greatly appreciated.</p>
  <pre><code>import tkinter as tk
  import requests
  
  # callouts for window size
  HEIGHT = 650
  WIDTH = 600
  
  
  # function for response
  def format_response(selected_stock):
  try:
      name1 = selected_stock['data']['name']
      symbol1 = selected_stock['data']['symbol']
      high1 = selected_stock['data']['eod'][1]['high']
  
      final_str = 'Name: %s \nSymbol: %s \nEnd of Day ($ USD): %s' % (name1, symbol1, high1)
  except:
      final_str = 'There was a problem retrieving that information'
  
  return final_str
  
  
  # function linking to API
  def stock_data(entry):
  params = {'access_key': 'xxx'}
  response = requests.get('http://api.marketstack.com/v1/tickers/' + entry + '/' + 'eod', params=params)
  selected_stock = response.json()
  
  label2['text'] = format_response(selected_stock)
  
  
  # function for response
  def format_response2(stock_hist_data):
  try:
      name = stock_hist_data['data']['name']
      symbol = stock_hist_data['data']['symbol']
      high = stock_hist_data['data']['eod'][1]['high']
      name3 = stock_hist_data['data']['name']
      symbol3 = stock_hist_data['data']['symbol']
      high3 = stock_hist_data['data']['eod'][1]['high']
  
      final_str2 = 'Name: %s \nSymbol: %s \nEnd of Day ($ USD): %s' % (name, symbol, high)
      final_str3 = '\nName: %s \nSymbol: %s \nEnd of Day ($ USD): %s' % (name3, symbol3, high3)
  except:
      final_str2 = 'There was a problem retrieving that information'
      final_str3 = 'There was a problem retrieving that information'
  
  return final_str2 + final_str3
  
  
  # function for response in lower window
  def stock_hist_data(entry2):
  params2 = {'access_key': 'xxx'}
  response2 = requests.get('http://api.marketstack.com/v1/tickers/' + entry2 + '/' + 'eod', params=params2)
  hist_data = response2.json()
  
  label4['text'] = format_response2(hist_data)
  </code></pre>