options

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package options defines custom DataTypes and settable options for use in constructing, modifying, and displaying DataFrames and Series.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAsync

func GetAsync() bool

GetAsync returns Async.

func GetDisplayFloatPrecision

func GetDisplayFloatPrecision() int

GetDisplayFloatPrecision returns DisplayFloatPrecision.

func GetDisplayMaxColumns

func GetDisplayMaxColumns() int

GetDisplayMaxColumns returns DisplayMaxColumns.

func GetDisplayMaxRows

func GetDisplayMaxRows() int

GetDisplayMaxRows returns DisplayMaxRows.

func GetDisplayMaxWidth

func GetDisplayMaxWidth() int

GetDisplayMaxWidth returns DisplayMaxWidth.

func GetDisplayRepeatedLabels

func GetDisplayRepeatedLabels() bool

GetDisplayRepeatedLabels returns DisplayRepeatedLabels.

func GetDisplayStringNullFiller

func GetDisplayStringNullFiller() string

GetDisplayStringNullFiller returns DisplayStringNullFiller.

func GetDisplayTimeFormat

func GetDisplayTimeFormat() string

GetDisplayTimeFormat returns DisplayTimeFormat.

func GetLogWarnings

func GetLogWarnings() bool

GetLogWarnings returns LogWarnings.

func GetStringNullValues

func GetStringNullValues() []string

GetStringNullValues returns StringNullValues.

func RestoreDefaults

func RestoreDefaults()

RestoreDefaults resets options back to their default setting

func SetAsync

func SetAsync(boolean bool)

SetAsync sets Async to boolean. Async is an option for executing certain operations over multiple groups (e.g., math on Groupings or Columns) as goroutines instead of synchronously. If true, eligible operations are split into goroutines and merged back together.

default: true

func SetDisplayFloatPrecision

func SetDisplayFloatPrecision(n int)

SetDisplayFloatPrecision sets DisplayFloatPrecision to n decimal places. DisplayFloatPrecision is an option when printing a Series. It is the number of decimal points in floating point values and index labels.

Default precision: 2 decimal points

func SetDisplayMaxColumns

func SetDisplayMaxColumns(n int)

SetDisplayMaxColumns sets DisplayMaxColumns to n columns. DisplayMaxColumns is an option when printing a Series. It is the max number of columns that will be printed to the screen. If the actual number of columns is longer than the max, the first n/2 and last n/2 will be displayed, and the middle will be elided.

Default width: 50 columns

func SetDisplayMaxRows

func SetDisplayMaxRows(n int)

SetDisplayMaxRows sets DisplayMaxRow to n rows. DisplayMaxRow is an option when printing a Series. It is the max number of rows that will be printed to the screen. If the actual number of rows is longer than the max, the first n/2 and last n/2 will be displayed, and the middle will be elided.

Default width: 50 rows

func SetDisplayMaxWidth

func SetDisplayMaxWidth(n int)

SetDisplayMaxWidth sets DisplayMaxWidth to n characters. DisplayMaxWidth is an option when printing a Series. It is the widest allowable character width for an index label or value. If a label is longer than the max, it will be elided at the end.

Default width: 35 characters

func SetDisplayRepeatedLabels

func SetDisplayRepeatedLabels(boolean bool)

SetDisplayRepeatedLabels sets DisplayRepeatedLabels to boolean. DisplayRepeatedLabels is an option when printing a Series. If true, all index labels will be shown, like so:

A 0 foo

B 0 bar

C 1 baz

If false, repeated index labels in the same level will be excluded, like so:

A 0 foo

B ... bar

C 1 baz

NB: ellipsis not included in actual printing

Default: false

func SetDisplayStringNullFiller

func SetDisplayStringNullFiller(s string)

SetDisplayStringNullFiller sets DisplayStringNullFiller to "s". DisplayStringNullFiller is an option when printing a Series. It is how null string values are represented.

Default: "NaN"

func SetDisplayTimeFormat

func SetDisplayTimeFormat(s string)

SetDisplayTimeFormat formats how datetimes are displayed, using the syntax specified in package time.Time.

Default: "1/2/2006T15:04:05"

func SetLogWarnings

func SetLogWarnings(boolean bool)

SetLogWarnings sets LogWarnings to boolean. LogWarnings is an option when executing functions within this module. If true, non-returned errors are logged to stderr. This is relevant for many common exploratory methods, which are often chained together and therefore not designed to return an error value.

default: true

func SetStringNullValues

func SetStringNullValues(nullList []string)

SetStringNullValues sets StringNullValues to include only those items contained in nullList. StringNullValues is an option when constructing or converting a Series. It is the list of string values that are considered null.

default: []string{"NaN", "n/a", "N/A", "", "nil"}

Types

type DataType

type DataType int

DataType identifies the type of a data object. For most values it is interchangeable with the reflect.Type value, but it supports custom identifiers as well (e.g., DateTime).

const (
	None DataType = iota
	Float64
	Int64
	String
	Bool
	DateTime
	Interface
	PlaceholdervalueType
	Unsupported
)

datatype convenience options

func DT

func DT(datatype string) DataType

DT returns the DataType associated with a string.

func (DataType) String

func (datatype DataType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL