Skip to content

Instantly share code, notes, and snippets.

@micahstubbs
Created December 6, 2014 18:18
Show Gist options
  • Save micahstubbs/38f55db72910af5217cd to your computer and use it in GitHub Desktop.
Save micahstubbs/38f55db72910af5217cd 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=['Date','Effective Tax Rate','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