Python Forum
How to get input to another code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get input to another code
#1
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.
Reply
#2
I solved this problem. The problem is space between instrument and equal (=)

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

Maybe it will help somebody.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question in this code, I input Key_word, it can not find although all data was exact Help me! duchien04x4 3 1,099 Aug-31-2023, 05:36 PM
Last Post: deanhystad
  Code won't break While loop or go back to the input? MrKnd94 2 1,000 Oct-26-2022, 10:10 AM
Last Post: Larz60+
  Help Switching between keyboard/Mic input in my code Extra 1 1,124 Aug-28-2022, 10:16 PM
Last Post: deanhystad
  Code giving same output no matter the input. Yort 2 2,600 Dec-20-2020, 05:59 AM
Last Post: buran
  Repeating lines of code by an input Josh_Albanos 3 2,451 Oct-15-2020, 01:04 AM
Last Post: deanhystad
  My code is giving my an output of zero, no matter what value I input PiyushBanarjee 1 1,934 Jul-01-2020, 04:34 AM
Last Post: bowlofred
  Hi, I need help with defining user's input and applying it to code. jlmorenoc 2 2,318 Jun-24-2020, 02:10 PM
Last Post: pyzyx3qwerty
  Input() function not working in VS Code darpInd 7 13,458 Feb-17-2020, 03:28 PM
Last Post: snippsat
  Help w/ Max/Min User Input Code ThatGreatState 2 2,222 Nov-26-2019, 02:52 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020