csv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package csv implements reading and parsing of Shiller data from CSV format into Protobuf representation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCents

func ParseCents(s string) (c *pb.Cents, err error)

ParseCents parses the string ####.## as cents, i.e. the integral part is multiplied by 100 and summed with fractional part (i*100 + f).

func ParseDate

func ParseDate(s string) (d *pb.Date, err error)

ParseDate parses a value from the date cell. It expects the date to be in the YYYY.MM form with the exception for October, which uses YYYY.1 format (presumably Excel drops zero and treats YYYY.MM as s number with up to 2 precision digits... so 1234.10 becomes 1234.1).

func Read

func Read(r io.Reader) (*pb.Market, error)

Read reads market data in CSV format from the reader. It returns market data in Protobuf format or error. It is all or nothing operation, i.e., an error in one of the records invalidaes all data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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