Python Forum

Full Version: How to get input to another code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,
I would like to ask you. I need to get quandl input ID to the second line of code (quandl.get(*****)). Is it even possible to do it? Please, can you give me an advice?

instrument = input("Insert quandl ID") 
Ticker1 = quandl.get(**Instrument input here****, start_date="2017-1-1", end_date=datetime.today())
I tried this

instrument = input("Insert quandl ID")  Ticker1 =
quandl.get(instrument, start_date="2017-1-1", end_date=datetime.today())
But this variantion show me warning like this:
[Image: 298eb647eb.png]

Maybe I have mistake in this part of code?

fig, ax = plt.subplots(figsize=(22, 15))
ax = plt.subplot(511)
plt.plot(df1[instrument], label='Podkladový instrument', color = "black")
plt.legend(loc=0)
Thank you so much for advice.
I solved this problem. The problem is space between instrument and equal (=)

this works instrument= input("Insert quandl ID")

Maybe it will help somebody.