<?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: Python Program in Sas Viya in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910141#M10687</link>
    <description>&lt;P&gt;I have to believe the user is referring to using Proc Python in Viya. The proc also has similarly named methods for moving data between pandas and SAS, though the method signatures are different.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you looked at the log after the failure to see what errors or other information might be available?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.df2sd(df, "LIBRARY.Table_Name")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.printLOG()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you know what's in your dataframe? Realize that dataframes can contain things SAS datasets cannot. Each cell of a dataframe can contain anything. They aren't bound by 'relation table' constraints like SAS data sets or database tables. Relational tables require that the data type in every row of a table be the same for a given column. data frames don't require that. There are all kinds of ways a dataframe can't be converted into a SAS data set. But that's speculation at this point as I have no idea what's in your dataframe of what errors might be in log stating what went wrong.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, let's start by looking at the log for the method you ran that didn't seem to work right. BTW, you can change the setting so the log is simply displayed to begin with:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.hideLOG(False)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.df2sd(df, "LIBRARY.Table_Name")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's also possible that there could be an enhancement or bug fix that's happened since the version of viya you're using. it's almost a year old. So, again, seeing what actually happened will help with that. Looking at the LOG is the first thing to do.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2024 19:53:42 GMT</pubDate>
    <dc:creator>sastpw</dc:creator>
    <dc:date>2024-01-02T19:53:42Z</dc:date>
    <item>
      <title>Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909636#M10679</link>
      <description>&lt;P&gt;I have a dataframe contains 3399 rows and 16 columns running in a Python program. I want to create a table from it on SAS library.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS.df2sd(df,"LIBRARY.Table_Name")&lt;/P&gt;&lt;P&gt;After i create the table there no rows in the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HuseyinKaya_0-1703510834876.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92064i83B17E4D8A8D4C14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HuseyinKaya_0-1703510834876.png" alt="HuseyinKaya_0-1703510834876.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then i used the following code for understanding the problem&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS.df2sd(df.iloc[:1000],"LIBRARY.Table_Name")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HuseyinKaya_1-1703511001183.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92065iB1002541C5482545/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HuseyinKaya_1-1703511001183.png" alt="HuseyinKaya_1-1703511001183.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now i can see all the 1000 rows and 16 columns but i want to create all the rows.&lt;/P&gt;&lt;P&gt;There is no space problem in the server, I cannot identify the problem, can somebody help me?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 13:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909636#M10679</guid>
      <dc:creator>HuseyinKaya</dc:creator>
      <dc:date>2023-12-25T13:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909642#M10680</link>
      <description>I have same problem, please help me.</description>
      <pubDate>Mon, 25 Dec 2023 14:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909642#M10680</guid>
      <dc:creator>Kerim1</dc:creator>
      <dc:date>2023-12-25T14:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909679#M10681</link>
      <description>&lt;P&gt;I would like to ask for your help on this issue. It does not convert the existing dataframe into a SAS table, regardless of the number of columns and records, for no reason. Sometimes I experience this situation, sometimes I don't.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2023 10:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909679#M10681</guid>
      <dc:creator>IbrahimTurkoglu</dc:creator>
      <dc:date>2023-12-26T10:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909740#M10683</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/457037"&gt;@HuseyinKaya&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/460947"&gt;@IbrahimTurkoglu&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/457688"&gt;@Kerim1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What really would help us help you is if you could provide some as simple as possible sample code that allows to replicate the issue (i.e. load sashelp.class into the data frame).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please state what version of saspy and Viya you are using.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 09:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909740#M10683</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-12-27T09:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909840#M10684</link>
      <description>&lt;P&gt;Actually, the code is so basic, I prepare a python df with 3k+ columns and try to create a sas table and insert it with df2sd function and get no error, only it says "Socket connection failed during data transfer", column's name lenth less than 22, you may try with dummy data, thanks for reply.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 13:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909840#M10684</guid>
      <dc:creator>HuseyinKaya</dc:creator>
      <dc:date>2023-12-28T13:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909841#M10685</link>
      <description>By the way i don't use saspy and viya = 2023.3</description>
      <pubDate>Thu, 28 Dec 2023 14:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909841#M10685</guid>
      <dc:creator>HuseyinKaya</dc:creator>
      <dc:date>2023-12-28T14:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909844#M10686</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/457037"&gt;@HuseyinKaya&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;By the way i don't use saspy and viya = 2023.3&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Method&amp;nbsp;df2sd comes with the saspy package so not sure what you're talking about.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sassoftware.github.io/saspy/api.html" target="_blank"&gt;https://sassoftware.github.io/saspy/api.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without seeing your code and ideally log there isn't much more I can say.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 14:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/909844#M10686</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-12-28T14:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910141#M10687</link>
      <description>&lt;P&gt;I have to believe the user is referring to using Proc Python in Viya. The proc also has similarly named methods for moving data between pandas and SAS, though the method signatures are different.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you looked at the log after the failure to see what errors or other information might be available?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.df2sd(df, "LIBRARY.Table_Name")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.printLOG()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you know what's in your dataframe? Realize that dataframes can contain things SAS datasets cannot. Each cell of a dataframe can contain anything. They aren't bound by 'relation table' constraints like SAS data sets or database tables. Relational tables require that the data type in every row of a table be the same for a given column. data frames don't require that. There are all kinds of ways a dataframe can't be converted into a SAS data set. But that's speculation at this point as I have no idea what's in your dataframe of what errors might be in log stating what went wrong.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So, let's start by looking at the log for the method you ran that didn't seem to work right. BTW, you can change the setting so the log is simply displayed to begin with:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.hideLOG(False)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS.df2sd(df, "LIBRARY.Table_Name")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's also possible that there could be an enhancement or bug fix that's happened since the version of viya you're using. it's almost a year old. So, again, seeing what actually happened will help with that. Looking at the LOG is the first thing to do.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 19:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910141#M10687</guid>
      <dc:creator>sastpw</dc:creator>
      <dc:date>2024-01-02T19:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910830#M10698</link>
      <description>&lt;P&gt;Hi, thanks for the help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used "&lt;SPAN&gt;SAS.hideLOG(False)" code and now i can identify what is the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HuseyinKaya_0-1704711070328.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92376i118F770C2FC328E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HuseyinKaya_0-1704711070328.png" alt="HuseyinKaya_0-1704711070328.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My data takes up too much space.(One row exceeds&amp;nbsp; 32768 Bytes)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i resolve this issue, is there any options for increasing 32768 Bytes?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910830#M10698</guid>
      <dc:creator>HuseyinKaya</dc:creator>
      <dc:date>2024-01-08T10:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910841#M10699</link>
      <description>&lt;P&gt;Character variables in SAS datasets are technically limited to 32767 bytes. I guess this limit also kicks in when processing rows from the dataframe.&lt;/P&gt;
&lt;P&gt;How is that dataframe defined?&lt;/P&gt;
&lt;P&gt;Please post the complete log of the step(s) creating the dataframe, and the complete log of the failing step by copy/pasting the log text into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 11:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910841#M10699</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-01-08T11:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910843#M10700</link>
      <description>&lt;P&gt;With .sas7bdat files character variables are limited to 32KB.&lt;/P&gt;
&lt;P&gt;Depending on what you need the data in SAS for you could eventually investigate if loading the data directly into CAS would be an option using VARCHAR(*).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have never done it but the SWAT package looks promising.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Better-Open-source-Integration-through-the-Python-Load-Objects/ta-p/902222" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Better-Open-source-Integration-through-the-Python-Load-Objects/ta-p/902222&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sassoftware.github.io/python-swat/" target="_blank"&gt;https://sassoftware.github.io/python-swat/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 11:57:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/910843#M10700</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-01-08T11:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python Program in Sas Viya</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/961775#M11027</link>
      <description>I am also facing the same problem. socket connection fails during data transfer</description>
      <pubDate>Thu, 13 Mar 2025 11:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Python-Program-in-Sas-Viya/m-p/961775#M11027</guid>
      <dc:creator>Namanfg</dc:creator>
      <dc:date>2025-03-13T11:19:50Z</dc:date>
    </item>
  </channel>
</rss>

