{"id":184435,"date":"2023-01-31T15:01:00","date_gmt":"2023-01-31T20:01:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/traders-insight\/python-run-to-import-another-folders-ipynb-files\/"},"modified":"2023-02-09T15:57:40","modified_gmt":"2023-02-09T20:57:40","slug":"python-run-to-import-another-folders-ipynb-files","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/","title":{"rendered":"Python: %run to Import Another Folder&#8217;s ipynb Files"},"content":{"rendered":"\n<p>This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders. It is essentially to run the imported ipynb files before running a main file. It can be used to split code blocks such as importing library, declaring user-defined functions, data and its preprocessing.<\/p>\n\n\n\n<p><a href=\"https:\/\/kiandlee.blogspot.com\/2023\/01\/python-importing-ipynb-file-jupyter.html\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Python : Importing an ipynb file (Jupyter Notebook) from another ipynb file<\/strong><\/a><\/p>\n\n\n\n<p>This post is similar to the previous post but easily extended to ipynb files from other folders. So I introduce it to you. It is so easy.<\/p>\n\n\n\n<p>To import ipynb files in another folders, we can use&nbsp;<strong>%run<\/strong>&nbsp;command.<\/p>\n\n\n\n<p>As an example, I split one file into three files:&nbsp;<strong>a0_load_lib_func.ipynb<\/strong>,&nbsp;<strong>a1_read_data.ipynb<\/strong>, and&nbsp;<strong>a2_run_rnn.ipynb<\/strong>. The first two files are saved at&nbsp;<strong>D:\/blog_temp\/<\/strong>&nbsp;for an illustration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-common-code-block-a1-load-lib-func-ipynb\">1) Common code block : a1_load_lib_func.ipynb<\/h3>\n\n\n\n<p><strong>a1_load_lib_func.ipynb<\/strong>&nbsp;contains package libraries, some user-defined functions.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Import Library\n# In&#91;1]:\n_________________________________________________________________\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom keras.models import Sequential\nfrom keras.layers import Dense, SimpleRNN\nget_ipython().run_line_magic('matplotlib', 'inline')\nfrom IPython.core.interactiveshell import InteractiveShell\nInteractiveShell.ast_node_interactivity = \"all\"\n_________________________________________________________________\n \n# Functions\n# In&#91;2]:\n_________________________________________________________________\n# convert into dataset matrix\ndef convertToMatrix(data, step):\n    X, Y =&#91;], &#91;]\n    for i in range(len(data)-step):\n        d=i+step; X.append(data&#91;i:d,]); Y.append(data&#91;d,])\n    return np.array(X), np.array(Y)\n \ndef draw_plot1(df,predicted):\n    index = df.index.values\n    plt.figure(figsize=(5, 2.5))\n    plt.plot(index,df); plt.plot(index,predicted)\n    plt.show()\n    return plt<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2) Reading data : a2_read_data.ipynb<\/h3>\n\n\n\n<p>a2_read_data.ipynb is used to read data.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Read Dataset\n# In&#91;3]:\n_________________________________________________________________\nstep = 4; N = 1000; Tp = 800    \nt=np.arange(0,N)\nx=np.sin(0.02*t)+2*np.random.rand(N)\ndf = pd.DataFrame(x)\n# df.head(); plt.plot(df); plt.show()\ntrain=df.values\ntrain = np.append(train,np.repeat(train&#91;-1,],step))\ntrainX,trainY = convertToMatrix(train,step)\ntrainX = np.reshape(trainX, (trainX.shape&#91;0], 1, trainX.shape&#91;1]))<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3) Main file : a3_run_rnn.ipynb<\/h3>\n\n\n\n<p>The following main file (<strong>a3_run_rnn.ipynb<\/strong>) imports two above files and run a SimpleRNN tensorflow function.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Import other folder's ipynb files\n# In&#91;1]:\n_________________________________________________________________\n# the same folder\n#%run \"a1_load_lib_func.ipynb\"\n#%run \"a2_read_data.ipynb\"\n \n# different folder\n%run \"D:\/blog_temp\/a1_load_lib_func.ipynb\"\n%run \"D:\/blog_temp\/a2_read_data.ipynb\"\n_________________________________________________________________\n \n# ## Building Model\n# In&#91;4]:\n_________________________________________________________________\nmodel = Sequential()\nmodel.add(SimpleRNN(units=32, input_shape=(1,step), activation=\"relu\"))\nmodel.add(Dense(8, activation=\"relu\")) \nmodel.add(Dense(1))\nmodel.compile(loss='mean_squared_error', optimizer='rmsprop')\nmodel.summary()\n_________________________________________________________________\nModel: \"sequential\"\n-----------------------------------------------------------------\n Layer (type)                Output Shape              Param #   \n=================================================================\n simple_rnn (SimpleRNN)      (None, 32)                1184      \n                                                                 \n dense (Dense)               (None, 8)                 264       \n                                                                 \n dense_1 (Dense)             (None, 1)                 9         \n                                                                 \n=================================================================\nTotal params: 1,457\nTrainable params: 1,457\nNon-trainable params: 0\n-----------------------------------------------------------------\n# ## Training Model\n# In&#91;5]:\n_________________________________________________________________\nmodel.fit(trainX, trainY, epochs=100, batch_size=16, verbose=0)\n_________________________________________________________________\n&lt;keras.callbacks.History at 0x22e182f8c70&gt;\n# In&#91;6]:\n_________________________________________________________________\ntrainPredict = model.predict(trainX)\ntrainScore = model.evaluate(trainX, trainY, verbose=0)\nprint(trainScore)\ndraw_plot1(df,trainPredict)\n_________________________________________________________________\n0.3513454794883728<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><em>Visit SH Fintech Modeling for additional insight on this topic: <a href=\"https:\/\/kiandlee.blogspot.com\/2023\/01\/python-run-to-import-another-folders.html\" rel=\"sponsored nofollow\">https:\/\/kiandlee.blogspot.com\/2023\/01\/python-run-to-import-another-folders.html<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.<\/p>\n","protected":false},"author":662,"featured_media":184436,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,349,338,350,341,344],"tags":[806,14512,6614,4659,1225,1224,595],"contributors-categories":[13728],"class_list":{"0":"post-184435","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-asia-pacific","12":"category-quant-development","13":"category-quant-regions","14":"tag-data-science","15":"tag-ipynb","16":"tag-jupyter-notebook","17":"tag-matplotlib","18":"tag-numpy","19":"tag-pandas","20":"tag-python","21":"contributors-categories-sh-fintech-modeling"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python: %run to Import Another Folder&#8217;s ipynb Files<\/title>\n<meta name=\"description\" content=\"This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/184435\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python: %run to Import Another Folder&#039;s ipynb Files\" \/>\n<meta property=\"og:description\" content=\"This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-31T20:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-09T20:57:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sang-Heon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Python: %run to Import Another Folder&#039;s ipynb Files\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sang-Heon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Sang-Heon Lee\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"headline\": \"Python: %run to Import Another Folder&#8217;s ipynb Files\",\n\t            \"datePublished\": \"2023-01-31T20:01:00+00:00\",\n\t            \"dateModified\": \"2023-02-09T20:57:40+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/\"\n\t            },\n\t            \"wordCount\": 228,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-blue-lights.jpg\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"ipynb\",\n\t                \"Jupyter Notebook\",\n\t                \"Matplotlib\",\n\t                \"NumPy\",\n\t                \"Pandas\",\n\t                \"Python\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/\",\n\t            \"name\": \"Python: %run to Import Another Folder's ipynb Files\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-blue-lights.jpg\",\n\t            \"datePublished\": \"2023-01-31T20:01:00+00:00\",\n\t            \"dateModified\": \"2023-02-09T20:57:40+00:00\",\n\t            \"description\": \"This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/python-run-to-import-another-folders-ipynb-files\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-blue-lights.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-blue-lights.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Python: %run to Import Another Folder's ipynb Files\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\",\n\t            \"name\": \"Sang-Heon Lee\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/sang-heonlee\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python: %run to Import Another Folder&#8217;s ipynb Files","description":"This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/184435\/","og_locale":"en_US","og_type":"article","og_title":"Python: %run to Import Another Folder's ipynb Files","og_description":"This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/","og_site_name":"IBKR Campus US","article_published_time":"2023-01-31T20:01:00+00:00","article_modified_time":"2023-02-09T20:57:40+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg","type":"image\/jpeg"}],"author":"Sang-Heon Lee","twitter_card":"summary_large_image","twitter_title":"Python: %run to Import Another Folder's ipynb Files","twitter_misc":{"Written by":"Sang-Heon Lee","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/"},"author":{"name":"Sang-Heon Lee","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"headline":"Python: %run to Import Another Folder&#8217;s ipynb Files","datePublished":"2023-01-31T20:01:00+00:00","dateModified":"2023-02-09T20:57:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/"},"wordCount":228,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg","keywords":["Data Science","ipynb","Jupyter Notebook","Matplotlib","NumPy","Pandas","Python"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/","name":"Python: %run to Import Another Folder's ipynb Files","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg","datePublished":"2023-01-31T20:01:00+00:00","dateModified":"2023-02-09T20:57:40+00:00","description":"This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/python-run-to-import-another-folders-ipynb-files\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg","width":1000,"height":563,"caption":"Python: %run to Import Another Folder's ipynb Files"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200","name":"Sang-Heon Lee","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/sang-heonlee\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-blue-lights.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/184435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=184435"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/184435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/184436"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=184435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=184435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=184435"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=184435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}