Rows Overview

Here you will find an overview of psv’s objects and methods, but not the objects attributes which are generated dynamically by psv.

Rows

class psv.core.objects.rowobjects.BaseRow(data, *args, **kwargs)

This Base Class represents a row in a spreadsheet

add_valid_attribute(attr, deletable=False)

Used by classes that inherit to add attributes to the whitelists

addcolumn(columnname, columndata='')

Adds a column for this row only

construct(*args, **kwargs)

This method can be used by inherited objects of BaseRow as if it was __init__

delcolumn(column)

Delete a cell by the orginal column name

Parameters:column (str) – The column name. Can be both long and short form.
getcolumn(column)

Get a cell by the orginal column name

Parameters:column (str) – The column name. Can be both long and short form.
Returns:String of the data, or an int/float if a number/decimal.
Return type:str, int, or float
longcolumn(columns=None)
Params columns:A collection of columns, if supplied the method will return only the specified columns.
Returns:Generates a dict that uses orginal names of the column.
Return type:dict
outputrow

Returns a boolean of the current output flag for this row

setcolumn(column, value)

Set a cell by the orginal column name

Parameters:
  • column (str) – The column name. Can be both long and short form.
  • value – The data to be set to the specified column
tabulate(format='grid', only_ascii=True, columns=None, text_limit=None)

Integrates tabulate library with psv

Parameters:
  • format (str) – A valid format for tabulate library.
  • columns – Collection of column names that will be included in the tabulating.
  • text_limit – The number of characters to include per cell.
Only_ascii:

If True, only return ascii characters.