OpenStructure
Data Structures | Functions
ost.table Namespace Reference

Data Structures

class  BinaryColExpr
 
class  TableCol
 
class  TableRow
 
class  Table
 

Functions

def MakeTitle (col_name)
 
def IsStringLike (value)
 
def IsNullString (value)
 
def IsScalar (value)
 
def GuessColumnType (iterator)
 
def Merge (table1, table2, by, only_matching=False)
 

Function Documentation

◆ GuessColumnType()

def ost.table.GuessColumnType (   iterator)

Definition at line 38 of file table.py.

◆ IsNullString()

def ost.table.IsNullString (   value)

Definition at line 23 of file table.py.

◆ IsScalar()

def ost.table.IsScalar (   value)

Definition at line 27 of file table.py.

◆ IsStringLike()

def ost.table.IsStringLike (   value)

Definition at line 14 of file table.py.

◆ MakeTitle()

def ost.table.MakeTitle (   col_name)

Definition at line 11 of file table.py.

◆ Merge()

def ost.table.Merge (   table1,
  table2,
  by,
  only_matching = False 
)
Returns a new table containing the data from both tables. The rows are 
combined based on the common values in the column(s) by. The option 'by' can
be a list of column names. When this is the case, merging is based on
multiple columns.
For example, the two tables below

==== ====
x     y            
==== ====
 1    10
 2    15
 3    20
==== ====

==== ====
x     u
==== ====
  1  100
  3  200
  4  400
==== ====

when merged by column x, produce the following output:

===== ===== =====
x      y     u
===== ===== =====
1      10    100
2      15    None
3      20    200
4      None  400
===== ===== =====

Definition at line 3131 of file table.py.