OriginPro
Public Member Functions | Public Attributes | List of all members
originpro.dc.Connector Class Reference

Public Member Functions

def __init__ (self, wks, dctype='', keep_DC=True)
 
def __del__ (self)
 
def settings (self)
 
def source (self)
 
def source (self, s)
 
def new_sheet (self, name)
 
def imp (self, fname='', sel='', sparks=False)
 

Public Attributes

 keep
 
 wks
 
 dc
 
 source
 

Detailed Description

Data Connector
    Parameters:
        wks (DSheet): the worksheet or martix sheet to use the connector
        dctype(str):  Name of the connector, CSV, Excel etc
        keep_DC(bool): Keep the connector after import
    Example:
        import originpro as op
        f = op.path('e')+r'Samples\Import and Export\S15-125-03.dat'
        wks = op.find_sheet()
        dc = op.Connector(wks)
        ss = dc.settings()
        partial = ss['partial']
        partial[op.attrib_key('Use')]='1'
        partial['row']='10:20'
        dc.imp(f)

Member Function Documentation

◆ imp()

def originpro.dc.Connector.imp (   self,
  fname = '',
  sel = '',
  sparks = False 
)
Import file

◆ new_sheet()

def originpro.dc.Connector.new_sheet (   self,
  name 
)
    Import a new selection into a new sheet

Parameters:
    name(str): selection, for example an Excel sheet name

Returns:
    None
Examples:
    dc.imp(f, sel='Oil')
    dc.new_sheet('Natural Gas')

◆ settings()

def originpro.dc.Connector.settings (   self)
Import settings

◆ source() [1/2]

def originpro.dc.Connector.source (   self)
Property getter returns the source of Data Connector

Parameters:

Returns:
    (str) Data Source

◆ source() [2/2]

def originpro.dc.Connector.source (   self,
  s 
)
Property setter set the source of Data Connector

Parameters:
    s(str): Data Source

Returns:
    None

The documentation for this class was generated from the following file: