<?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 as opensource code in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Python-as-opensource-code/m-p/791378#M32595</link>
    <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/410830"&gt;@sarafrass&lt;/a&gt;&amp;nbsp;, for a Model Studio pipeline you should save the plot to a png file which then gets rendered in the results. This is because the Open Code Node is running a subprocess - so the results aren't in the CAS session directly. Likewise if you want to render a table you need to dump the .csv file as part of your Python script.&amp;nbsp; There are some examples in the getting started GitHub projects: &lt;A href="https://github.com/sassoftware/sas-viya-dmml-pipelines/tree/master/open_source_code_node/simple_forest" target="_blank"&gt;https://github.com/sassoftware/sas-viya-dmml-pipelines/tree/master/open_source_code_node/simple_forest &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you validated the data is coming in as well? From memory you don't need the 'node.csv' part if you're using the&amp;nbsp;&lt;SPAN&gt;dm_inputdf&amp;nbsp;variable. The&amp;nbsp;dm_inputdf&amp;nbsp;is a convenience function to automatically download the table into CSV and load into Pandas saving you dealing with the .csv file import directly.&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;Harry&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 10:45:50 GMT</pubDate>
    <dc:creator>HarrySnart</dc:creator>
    <dc:date>2022-01-21T10:45:50Z</dc:date>
    <item>
      <title>Python as opensource code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Python-as-opensource-code/m-p/791247#M32590</link>
      <description>&lt;P&gt;Good afternoon everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm building a pipeline in SAS Vyia for learners and I would like to plot (if possible) a correlation matrix by computing it in python language (I attached the pipeline).&lt;/P&gt;&lt;P&gt;The code I've written so far is this on:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;import numpy as np&lt;BR /&gt;import seaborn as sns&lt;BR /&gt;import matplotlib.pyplot as plt&lt;BR /&gt;import pandas as pd&lt;BR /&gt;import warnings&lt;BR /&gt;warnings.filterwarnings('ignore')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bank_df = pd.read_csv(dm_inputdf + "node_data.csv")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;corr_df = bank_df.corr(method = "pearson")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;plt.figure(figsize=(10,8))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sns.heatmap(corr_df, annot=True)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;plt.show()&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unfortunately I cannot execute it because it keeps giving me error.&lt;/P&gt;&lt;P&gt;Actually, I would like to print a correlation matrix of the entire datafile but I can't understand which kind of path I should use..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 19:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Python-as-opensource-code/m-p/791247#M32590</guid>
      <dc:creator>sarafrass</dc:creator>
      <dc:date>2022-01-20T19:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python as opensource code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Python-as-opensource-code/m-p/791378#M32595</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/410830"&gt;@sarafrass&lt;/a&gt;&amp;nbsp;, for a Model Studio pipeline you should save the plot to a png file which then gets rendered in the results. This is because the Open Code Node is running a subprocess - so the results aren't in the CAS session directly. Likewise if you want to render a table you need to dump the .csv file as part of your Python script.&amp;nbsp; There are some examples in the getting started GitHub projects: &lt;A href="https://github.com/sassoftware/sas-viya-dmml-pipelines/tree/master/open_source_code_node/simple_forest" target="_blank"&gt;https://github.com/sassoftware/sas-viya-dmml-pipelines/tree/master/open_source_code_node/simple_forest &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you validated the data is coming in as well? From memory you don't need the 'node.csv' part if you're using the&amp;nbsp;&lt;SPAN&gt;dm_inputdf&amp;nbsp;variable. The&amp;nbsp;dm_inputdf&amp;nbsp;is a convenience function to automatically download the table into CSV and load into Pandas saving you dealing with the .csv file import directly.&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;Harry&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 10:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Python-as-opensource-code/m-p/791378#M32595</guid>
      <dc:creator>HarrySnart</dc:creator>
      <dc:date>2022-01-21T10:45:50Z</dc:date>
    </item>
  </channel>
</rss>

