Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSV base encoder #92

Open
skipor opened this issue Jan 24, 2018 · 0 comments
Open

TSV base encoder #92

skipor opened this issue Jan 24, 2018 · 0 comments

Comments

@skipor
Copy link
Contributor

skipor commented Jan 24, 2018

const debugChecks = tag.Debug // On true, checks fields order, types, and constraints (string has no whitespaces for example)
type FildType int
const (
    IntType FieldType = iota
    Float32Type 
    Float64Type
    StringType // White spaces are not allowed.
    ...
)
func New(type string, fields []string, fieldTypes []FiledType) *Encoder{}

func (e *Encoder) Start(){}
func (e *Encoder) AddInt(v int64){}
func (e *Encoder) AddString(v string){}
...
func (e *Encoder) Finish(){}

Create such encoder, and use it as base of phout.

By option, which is true by default, in first line print info about file format
{'type': type, 'names': [...], 'dtypes': [...]}
where types are some subset of https://docs.scipy.org/doc/numpy-1.13.0/user/basics.types.html

@skipor skipor added this to the 0.2 milestone Jan 24, 2018
@skipor skipor self-assigned this Jan 24, 2018
@skipor skipor changed the title TSV base encoder. TSV base encoder Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant