<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic how to save variables in one notebook to be imported into another? in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/how-to-save-variables-in-one-notebook-to-be-imported-into/m-p/45277#M6030</link>
    <description>&lt;P&gt;Say, I have a list of values, dictionaries, variable names in `notebook1.ipynb` that I'd like to re-use / import in another `notebook2.ipynb`.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, in `notebook1.ipynb`, I have the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var1 = "dallas"

var_lst = [100, 200, 300, 400, 500]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I save this to disk and read / import in `notebook2.ipynb` ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2023 19:24:54 GMT</pubDate>
    <dc:creator>kll</dc:creator>
    <dc:date>2023-09-18T19:24:54Z</dc:date>
    <item>
      <title>how to save variables in one notebook to be imported into another?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-save-variables-in-one-notebook-to-be-imported-into/m-p/45277#M6030</link>
      <description>&lt;P&gt;Say, I have a list of values, dictionaries, variable names in `notebook1.ipynb` that I'd like to re-use / import in another `notebook2.ipynb`.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, in `notebook1.ipynb`, I have the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var1 = "dallas"

var_lst = [100, 200, 300, 400, 500]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I save this to disk and read / import in `notebook2.ipynb` ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 19:24:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-save-variables-in-one-notebook-to-be-imported-into/m-p/45277#M6030</guid>
      <dc:creator>kll</dc:creator>
      <dc:date>2023-09-18T19:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to save variables in one notebook to be imported into another?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-save-variables-in-one-notebook-to-be-imported-into/m-p/49648#M6032</link>
      <description>&lt;P&gt;You can use %run ./&lt;SPAN&gt;notebook2 after defining variables in notebook1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So notebook2 will use the variables defined in notebook1&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 01:09:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-save-variables-in-one-notebook-to-be-imported-into/m-p/49648#M6032</guid>
      <dc:creator>Krishnamatta</dc:creator>
      <dc:date>2023-10-21T01:09:41Z</dc:date>
    </item>
  </channel>
</rss>

