<?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 Re: Exporting SAS tables from Python in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787635#M251700</link>
    <description>You're interpreting that version incorrectly, you have 9.4M5 which is one of the later versions. &lt;BR /&gt;&lt;BR /&gt;You can find your version of SAS with the following:&lt;BR /&gt;&lt;BR /&gt;proc product_status;run;</description>
    <pubDate>Wed, 29 Dec 2021 16:28:59 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-12-29T16:28:59Z</dc:date>
    <item>
      <title>Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787592#M251677</link>
      <description>&lt;P&gt;To load a sas table into Python is easy with the pandas module in Python, i.e. pd.read_sas. For documentation of that, see this link:&amp;nbsp;&lt;A href="https://www.marsja.se/how-to-read-sas-files-in-python-with-pandas/" target="_blank" rel="noopener"&gt;https://www.marsja.se/how-to-read-sas-files-in-python-with-pandas/&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now my problem is the following:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have SAS tables that I want to read into Python, this is easily done with pd.read_sas.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I will do some work in Python and &lt;STRONG&gt;would finally like to export the data frame to a Sas file directly, is this possible to do?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Note: I am aware of that the latest version of VIYA can handle Python code inside a SAS session but this is not relevant since in my organization we will not have the latest VIYA version.&amp;nbsp;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;EM&gt;Edit: Writing&amp;nbsp;proc setinit; run; &lt;BR /&gt;I get the following: Current version: 9.04.01M5P091317&lt;/EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 09:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787592#M251677</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-12-29T09:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787603#M251680</link>
      <description>&lt;P&gt;I know SAS can import R dataframe by IML.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; wrote several blog about it .&lt;/P&gt;
&lt;P&gt;Can you change Python into R ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 12:34:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787603#M251680</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-12-29T12:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787606#M251681</link>
      <description>No, unfortunately I must use Python.</description>
      <pubDate>Wed, 29 Dec 2021 12:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787606#M251681</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-12-29T12:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787610#M251684</link>
      <description>&lt;P&gt;You can use the SASPy package to connect to SAS from Python.&amp;nbsp; For an introduction, see &lt;A href="https://blogs.sas.com/content/sgf/2018/01/10/come-on-in-were-open-the-openness-of-sas-94/" target="_self"&gt;"How to code in Python with SAS 9.4."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;For more details, including how to transfer data from a Pandas data frame into a SAS data set, see Foreman (2018)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2597-2018.pdf" target="_blank"&gt;"SAS and Python: The Perfect Partners in Crime"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 12:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787610#M251684</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-12-29T12:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787612#M251686</link>
      <description>Great ! I just have forgotten SASPY package .</description>
      <pubDate>Wed, 29 Dec 2021 12:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787612#M251686</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-12-29T12:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787621#M251690</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks alot&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684" target="_blank" rel="noopener"&gt;@Rick_SAS&lt;/A&gt;&lt;SPAN&gt;, I will read out on all of that.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;At a first sight, I must have SAS 9.4 whereas my version is:&amp;nbsp;&lt;EM&gt;Current version: 9.04.01M5P091317 . &lt;/EM&gt;So this will not work&amp;nbsp;&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;Do you spontaneously know wether it is possible to (without connecting to SAS or anything) just export a pandas dataframe to a SAS table analogously as I easily could export a dataframe to a CSV or Excel file?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 14:37:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787621#M251690</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-12-29T14:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS tables from Python</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787635#M251700</link>
      <description>You're interpreting that version incorrectly, you have 9.4M5 which is one of the later versions. &lt;BR /&gt;&lt;BR /&gt;You can find your version of SAS with the following:&lt;BR /&gt;&lt;BR /&gt;proc product_status;run;</description>
      <pubDate>Wed, 29 Dec 2021 16:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-tables-from-Python/m-p/787635#M251700</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-29T16:28:59Z</dc:date>
    </item>
  </channel>
</rss>

