BookmarkSubscribeRSS Feed
3 REPLIES 3
sastpw
SAS Employee

It looks like you have that whole program in one cell. Jupyter doesn't work well when you try to put multiple statements which create output in a single cell. It works better when you have one output generating statement per cell. There are ways around that some, but just splitting the code into different cells should solve this for you. Try the following:

 

cell 1

import saspy

sas = saspy.SASsession()

sas

 

cell 2

cars = sas.sasdata('cars','sashelp')

cars

 

cell 3

stat = sas.sasstat()

res = stat.reg(...)

dir(res)

 

cell 4

res.DIAGNOSTICPANNEL

 

 

That should get you the output from all of those different methods, which none of is showing up in your one cell.

 

Tom

JJGR8
Calcite | Level 5

Hi Tom,

No difference- seems like there's something up with outputting graphics vs. just an html table. Could it be java related?

JJGR8_1-1668804571085.png

 

 

sastpw
SAS Employee

Well, I can't really tell what the issue is just from this picture. Have you tried anything else? The output you show from the cars.describe() is a dataframe, not an html table. There are dozens of other methods that return html. Have you tried any? Set the results to html instead of pandas and describe and head/tail (just about everything) will return html results instead of dataframes. What browser are you using? Can you try a different one? There are plenty of other diagnostics to try, we can get the html back raw and see what it is (I'm not really expecting it to be wrong or messed up). Try rendering it manually in jupyter and see if that does the same thing. Does any html render in in this environment? 

 

Can you submit the SASsession object, like in the example code I provided before, so then I can see other info that can help? 

 

To try some manual html rendering, look at cells 63-67 in this example notebook: https://github.com/sassoftware/saspy-examples/blob/main/SAS_contrib/saspy_example_github.ipynb

Cell 68 in that same notebook shows you how to get the html and write it to a local file. Then open that file and the html should render in a browser or whatever you have associated as the program for a .html file. 

 

 

Thanks,

Tom

That will help determine if there's an issue w/ jutpyter, the browser or something else.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 946 views
  • 0 likes
  • 2 in conversation