Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save neerajt/9506dfd593988f36252f to your computer and use it in GitHub Desktop.
Save neerajt/9506dfd593988f36252f to your computer and use it in GitHub Desktop.
from pandas import DataFrame, concat, merge
import Quandl
symbol_list = ["AMZN","GOOG", "MSFT"]
df = DataFrame(columns=['Effective Tax Rate', 'Earnings Before Interest and Taxes', 'symbol'])
for symbol in symbol_list:
effective_tax_parameter = "DMDRN/" + symbol + "_EFF_TAX"
ebit_parameter = "DMDRN/" + symbol + "_EBIT"
effective_tax_data = Quandl.get(effective_tax_parameter)
ebit_data = Quandl.get(ebit_parameter)
data = merge(effective_tax_data, ebit_data, left_index=True, right_index=True)
data['symbol'] = symbol
pieces = [df, data]
df = concat(pieces)
print df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment