{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!pip install saspy" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import saspy" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from saspy import autocfg" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "autocfg.main()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using SAS Config named: autogen_winlocal\n", "SAS Connection established. Subprocess id is 7676\n", "\n", "The encoding value provided doesn't match the SAS session encoding.\n", "SAS encoding is wlatin2. Specified encoding is windows-1252.\n", "Using encoding cp1250 instead to avoid transcoding problems.\n", "You can override this change, if you think you must, by changing the encoding attribute of the SASsession object, as follows.\n", "If you had 'sas = saspy.SASsession(), then submit: \"sas._io.sascfg.encoding='override_encoding'\" to change it.\n", "\n" ] } ], "source": [ "sas = saspy.SASsession()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Access Method = IOM\n", "SAS Config name = autogen_winlocal\n", "SAS Config file = c:\\users\\sebastianzajac\\desktop\\p3env\\lib\\site-packages\\saspy\\sascfg_personal.py\n", "WORK Path = C:\\Users\\SEBAST~1\\AppData\\Local\\Temp\\SAS Temporary Files\\_TD14276_DESKTOP-3S3DM1O_\\Prc2\\\n", "SAS Version = 9.04.01M6P11152018\n", "SASPy Version = 3.6.2\n", "Teach me SAS = False\n", "Batch = False\n", "Results = Pandas\n", "SAS Session Encoding = wlatin2\n", "Python Encoding value = cp1250\n", "SAS process Pid value = 14276\n" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "

\n", "\n", "
\f",
       "7                                                            System SAS                            20:05 Wednesday, December 9, 2020

34 ods listing close;ods html5 (id=saspy_internal) file=_tomods1 options(bitmap_mode='inline') device=svg style=HTMLBlue;
34 ! ods graphics on / outputfmt=png;
NOTE: Writing HTML5(SASPY_INTERNAL) Body file: _TOMODS1
35
36
37 data class_c;
38 set sashelp.class;
39 wzrost = round(height*2.54, 1);
40 waga = round(weight*0.453, 1);
41 drop height weight;
42 run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.CLASS_C has 19 observations and 5 variables.
NOTE: Instrukcja DATA zajęła (całkowity czas przetwarzania):
real time 0.01 seconds
cpu time 0.03 seconds


43 /*
44 title Pierwszy raport;
45 proc print data=class_c noobs;
46 where sex='F' and age >13;
47 run;
48 */
49
50
51
52 ods html5 (id=saspy_internal) close;ods listing;
53
\f", "8 System SAS 20:05 Wednesday, December 9, 2020

54
\n", "\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%SAS sas\n", "\n", "data class_c;\n", "set sashelp.class;\n", "wzrost = round(height*2.54, 1);\n", "waga = round(weight*0.453, 1);\n", "drop height weight;\n", "run;\n", "/*\n", "title Pierwszy raport;\n", "proc print data=class_c noobs;\n", "where sex='F' and age >13;\n", "run;\n", "*/" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "fname = 'myfile.txt'\n", "sas.symput ('fname', fname)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "

\n", "\n", "
\f",
       "15                                                           System SAS                            20:05 Wednesday, December 9, 2020

86 ods listing close;ods html5 (id=saspy_internal) file=_tomods1 options(bitmap_mode='inline') device=svg style=HTMLBlue;
86 ! ods graphics on / outputfmt=png;
NOTE: Writing HTML5(SASPY_INTERNAL) Body file: _TOMODS1
87
88 Filename file1 "&fname.";
89
90 %put &fname.;
myfile.txt
91
92 proc summary data=sashelp.class;
93 var weight;
94 run;

ERROR: Neither the PRINT option nor a valid output statement has been given.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SUMMARY zajęła (całkowity czas przetwarzania):
real time 0.02 seconds
cpu time 0.03 seconds

95 %let summaryrc=&syserr;
96 %put &summaryrc.;
1012
97


98 proc univariate data=sashelp.class noprint;
99 var height weight;
100 run;

NOTE: PROCEDURE UNIVARIATE zajęła (całkowity czas przetwarzania):
real time 0.01 seconds
cpu time 0.01 seconds


101 %let unirc=&syserr;
102 %put &unirc.;
0
103
104
105
106 ods html5 (id=saspy_internal) close;ods listing;
107
\f", "16 System SAS 20:05 Wednesday, December 9, 2020

108
\n", "\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%SAS sas\n", "Filename file1 \"&fname.\";\n", "\n", "%put &fname.;\n", "\n", "proc summary data=sashelp.class;\n", " var weight;\n", "run;\n", "%let summaryrc=&syserr;\n", "%put &summaryrc.;\n", "\n", "proc univariate data=sashelp.class noprint;\n", " var height weight;\n", "run;\n", "%let unirc=&syserr;\n", "%put &unirc.;" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['WORK', 'MAPS', 'SASHELP', 'MAPSSAS', 'MAPSGFK', 'SASUSER']" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas.assigned_librefs()" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'LOG': '\\x0c21 System SAS 20:05 Wednesday, December 9, 2020\\n\\n141 ods listing close;ods html5 (id=saspy_internal) file=_tomods1 options(bitmap_mode=\\'inline\\') device=svg style=HTMLBlue;\\n141 ! ods graphics on / outputfmt=png;\\nNOTE: Writing HTML5(SASPY_INTERNAL) Body file: _TOMODS1\\n142 \\n143 LIBNAME dane \"C:\\\\Users\\\\SebastianZajac\\\\Desktop\\\\SAS PRESETATION\";\\nNOTE: Libref DANE was successfully assigned as follows: \\n Engine: V9 \\n Physical Name: C:\\\\Users\\\\SebastianZajac\\\\Desktop\\\\SAS PRESETATION\\n144 \\n145 \\n146 ods html5 (id=saspy_internal) close;ods listing;\\n147 \\n\\x0c22 System SAS 20:05 Wednesday, December 9, 2020\\n\\n148 ',\n", " 'LST': ''}" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas.submit(\"\"\"LIBNAME dane \"C:\\\\Users\\\\SebastianZajac\\\\Desktop\\\\SAS PRESETATION\";\"\"\")" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['WORK', 'DANE', 'MAPS', 'SASHELP', 'MAPSSAS', 'MAPSGFK', 'SASUSER']" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas.assigned_librefs() " ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('diabetes.csv')" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PatientIDPregnanciesPlasmaGlucoseDiastolicBloodPressureTricepsThicknessSerumInsulinBMIDiabetesPedigreeAgeDiabetic
01354778017180342343.5097261.213191210
1114743889293473621.2405760.158365230
21640031711547523541.5115230.079019230
318833509103782530429.5821921.282870431
4142411918559273542.6045360.549542220
\n", "
" ], "text/plain": [ " PatientID Pregnancies PlasmaGlucose DiastolicBloodPressure \\\n", "0 1354778 0 171 80 \n", "1 1147438 8 92 93 \n", "2 1640031 7 115 47 \n", "3 1883350 9 103 78 \n", "4 1424119 1 85 59 \n", "\n", " TricepsThickness SerumInsulin BMI DiabetesPedigree Age Diabetic \n", "0 34 23 43.509726 1.213191 21 0 \n", "1 47 36 21.240576 0.158365 23 0 \n", "2 52 35 41.511523 0.079019 23 0 \n", "3 25 304 29.582192 1.282870 43 1 \n", "4 27 35 42.604536 0.549542 22 0 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "sas_df = sas.read_csv('diabetes.csv')" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Libref = WORK\n", "Table = _csv\n", "Dsopts = {}\n", "Results = Pandas" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas_df" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'LOG': \"\\x0c44 System SAS 20:05 Wednesday, December 9, 2020\\n\\n333 ods listing close;ods html5 (id=saspy_internal) file=_tomods1 options(bitmap_mode='inline') device=svg style=HTMLBlue;\\n333 ! ods graphics on / outputfmt=png;\\nNOTE: Writing HTML5(SASPY_INTERNAL) Body file: _TOMODS1\\n334 \\n335 data dane.diabets;set _csv;run;\\n\\nNOTE: There were 15000 observations read from the data set WORK._CSV.\\nNOTE: The data set DANE.DIABETS has 15000 observations and 10 variables.\\nNOTE: Instrukcja DATA zajęła (całkowity czas przetwarzania):\\n real time 0.01 seconds\\n cpu time 0.00 seconds\\n \\n\\n336 \\n337 \\n338 ods html5 (id=saspy_internal) close;ods listing;\\n339 \\n\\x0c45 System SAS 20:05 Wednesday, December 9, 2020\\n\\n340 \",\n", " 'LST': ''}" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas.submit(\"data dane.diabets;set _csv;run;\")" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PatientIDPregnanciesPlasmaGlucoseDiastolicBloodPressureTricepsThicknessSerumInsulinBMIDiabetesPedigreeAgeDiabetic
01354778017180342343.5097261.213191210
1114743889293473621.2405760.158365230
21640031711547523541.5115230.079019230
318833509103782530429.5821921.282870431
4142411918559273542.6045360.549542220
\n", "
" ], "text/plain": [ " PatientID Pregnancies PlasmaGlucose DiastolicBloodPressure \\\n", "0 1354778 0 171 80 \n", "1 1147438 8 92 93 \n", "2 1640031 7 115 47 \n", "3 1883350 9 103 78 \n", "4 1424119 1 85 59 \n", "\n", " TricepsThickness SerumInsulin BMI DiabetesPedigree Age Diabetic \n", "0 34 23 43.509726 1.213191 21 0 \n", "1 47 36 21.240576 0.158365 23 0 \n", "2 52 35 41.511523 0.079019 23 0 \n", "3 25 304 29.582192 1.282870 43 1 \n", "4 27 35 42.604536 0.549542 22 0 " ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sas_df.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "type(sas_df.head())" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "# pd.DataFrame -> SAStable\n", "df2 = sas.df2sd(df)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df2" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sas.list_tables('work')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sas.list_tables('dane')" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "iris_sas = sas.sasdata('iris','sashelp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "?sas.sasdata" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "??sas.sasdata" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas.info()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas.columnInfo()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
VariableLabelNNMissMedianMeanStdDevMinP25P50P75Max
0SepalLengthSepal Length (mm)150058.058.4333338.280661435158.06479
1SepalWidthSepal Width (mm)150030.030.5733334.358663202830.03344
2PetalLengthPetal Length (mm)150043.537.58000017.652982101643.55169
3PetalWidthPetal Width (mm)150013.011.9933337.6223771313.01825
\n", "
" ], "text/plain": [ " Variable Label N NMiss Median Mean StdDev \\\n", "0 SepalLength Sepal Length (mm) 150 0 58.0 58.433333 8.280661 \n", "1 SepalWidth Sepal Width (mm) 150 0 30.0 30.573333 4.358663 \n", "2 PetalLength Petal Length (mm) 150 0 43.5 37.580000 17.652982 \n", "3 PetalWidth Petal Width (mm) 150 0 13.0 11.993333 7.622377 \n", "\n", " Min P25 P50 P75 Max \n", "0 43 51 58.0 64 79 \n", "1 20 28 30.0 33 44 \n", "2 10 16 43.5 51 69 \n", "3 1 3 13.0 18 25 " ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "iris_sas.means()" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "proc means data=sashelp.'iris'n stackodsoutput n nmiss median mean std min p25 p50 p75 max;run;\n" ] } ], "source": [ "sas.teach_me_SAS(True)\n", "iris_sas.means()\n", "sas.teach_me_SAS(False)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "Wynik SAS-owy\r\n", "\r\n", "\r\n", "\r\n", "
\r\n", "
\r\n", "

System SAS

\r\n", "
\r\n", "
\r\n", "

Procedura MEANS

\r\n", "
\r\n", "
\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "
ZmiennaEtykietaNN brakówMedianaŚredniaOdch. std.Minimum25. centyl50. centyl75. centylMaksimum
SepalLengthSepal Length (mm)150058.00000058.4333338.28066143.00000051.00000058.00000064.00000079.000000
SepalWidthSepal Width (mm)150030.00000030.5733334.35866320.00000028.00000030.00000033.00000044.000000
PetalLengthPetal Length (mm)150043.50000037.58000017.65298210.00000016.00000043.50000051.00000069.000000
PetalWidthPetal Width (mm)150013.00000011.9933337.6223771.0000003.00000013.00000018.00000025.000000
\r\n", "
\r\n", "
\r\n", "\r\n", "\r\n" ], "text/plain": [ "" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%%SAS sas\n", "proc means data=sashelp.'iris'n stackodsoutput n nmiss median mean std min p25 p50 p75 max;run;" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas.bar('Species')" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "Wynik SAS-owy\r\n", "\r\n", "\r\n", "\r\n", "
\r\n", "
\r\n", "
\r\n", "\"Procedura\r\n", "
\r\n", "
\r\n", "
\r\n", "\r\n", "\r\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "iris_sas.hist('PetalLength')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas.heatmap('PetalLength','PetalWidth')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "vlist = iris_sas.info().Variable.tolist()\n", "vlist" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_sas.columns" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "c = sas.submit(\"\"\"proc print data=sashelp.class; run;\"\"\")" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\f", "83 System SAS 20:05 Wednesday, December 9, 2020\n", "\n", "15616 ods listing close;ods html5 (id=saspy_internal) file=_tomods1 options(bitmap_mode='inline') device=svg style=HTMLBlue;\n", "15616 ! ods graphics on / outputfmt=png;\n", "NOTE: Writing HTML5(SASPY_INTERNAL) Body file: _TOMODS1\n", "15617 \n", "15618 proc print data=sashelp.class; run;\n", "\n", "NOTE: There were 19 observations read from the data set SASHELP.CLASS.\n", "NOTE: PROCEDURE PRINT zajęła (całkowity czas przetwarzania):\n", " real time 0.03 seconds\n", " cpu time 0.03 seconds\n", " \n", "\n", "15619 \n", "15620 \n", "15621 ods html5 (id=saspy_internal) close;ods listing;\n", "15622 \n", "\f", "84 System SAS 20:05 Wednesday, December 9, 2020\n", "\n", "15623 \n" ] } ], "source": [ "print(c['LOG'])" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "from IPython.display import HTML\n" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "Wynik SAS-owy\r\n", "\r\n", "\r\n", "\r\n", "
\r\n", "
\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "\r\n", "
Obs.NameSexAgeHeightWeight
1AlfredM1469.0112.5
2AliceF1356.584.0
3BarbaraF1365.398.0
4CarolF1462.8102.5
5HenryM1463.5102.5
6JamesM1257.383.0
7JaneF1259.884.5
8JanetF1562.5112.5
9JeffreyM1362.584.0
10JohnM1259.099.5
11JoyceF1151.350.5
12JudyF1464.390.0
13LouiseF1256.377.0
14MaryF1566.5112.0
15PhilipM1672.0150.0
16RobertM1264.8128.0
17RonaldM1567.0133.0
18ThomasM1157.585.0
19WilliamM1566.5112.0
\r\n", "
\r\n", "
\r\n", "\r\n", "\r\n" ], "text/plain": [ "" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "HTML(c['LST'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "a =iris_sas.means()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "a[a.Median>25]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 4 }