How to use the saspy.pysas34.SAS_data function in saspy

To help you get started, we’ve selected a few saspy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sassoftware / saspy / saspy / pysas34.py View on Github external
self._asubmit(code, "text")

      for row in df.iterrows():
         card  = ""
         for col in range(len(row[1])):
            var = str(row[1][col])
            if dts[col] == 'N' and var == 'nan':
               var = '.'
            card += var+chr(9)
         self._asubmit(card, "text")
   
      self._asubmit(";run;", "text")
   
      if self.exist(table, libref):
         return SAS_data(self, libref, table, out)
      else:
         return None
github sassoftware / saspy / saspy / pysas34.py View on Github external
code  = "filename x "
   
      if file.startswith(("http","HTTP")):
         code += "url "
   
      code += "\'"+file+"\';\n"
      code += "proc import datafile=x out="
      code += libref+"."+table
      code += " dbms=csv replace; run;"
      ll = self.submit(code, "text")
   
      if self.nosub:
         print(ll['LOG'])

      if self.exist(table, libref):
         return SAS_data(self, libref, table, out)
      else:
         return None
github sassoftware / saspy / saspy / pysas34.py View on Github external
def sasdata(self, table, libref="work", out='HTML'):
      if self.exist(table, libref):
         return SAS_data(self, libref, table, out)
      else:
         return None