Versions in this module Expand all Collapse all v0 v0.2.0 Oct 17, 2026 v0.1.0 Oct 10, 2026 Changes in this version + var ErrArgument = errors.New("dataframe: invalid argument") + var ErrColumn = errors.New("dataframe: no such column") + var ErrDType = errors.New("dataframe: unsupported dtype") + var ErrIndex = errors.New("dataframe: position out of range") + var ErrLabel = errors.New("dataframe: label not in index") + var ErrLength = errors.New("dataframe: length mismatch") + var ErrParse = errors.New("dataframe: parse error") + var ErrQuery = errors.New("dataframe: bad query") + var MaxColumns = 20 + var MaxRows = 60 + var MinRows = 10 + func Must[T any](v T, err error) T + func Timestamp(s string, layout ...string) (time.Time, error) + type AggSpec struct + Column string + Funcs []string + func Agg(column string, funcs ...string) AggSpec + type CSVOption func(*csvConfig) + func CSVComment(c byte) CSVOption + func CSVDTypes(dtypes map[string]DType) CSVOption + func CSVDateFormat(layout string) CSVOption + func CSVFalseValues(tokens ...string) CSVOption + func CSVHeader(present bool) CSVOption + func CSVIndexCol(name string) CSVOption + func CSVIndexColumn(i int) CSVOption + func CSVKeepDefaultNA(keep bool) CSVOption + func CSVNAValues(tokens ...string) CSVOption + func CSVNRows(n int) CSVOption + func CSVNames(names ...string) CSVOption + func CSVParseDates(names ...string) CSVOption + func CSVQuote(c byte) CSVOption + func CSVSeparator(c byte) CSVOption + func CSVSkipBlankLines(skip bool) CSVOption + func CSVSkipRows(n int) CSVOption + func CSVTrueValues(tokens ...string) CSVOption + func CSVUseCols(names ...string) CSVOption + type CSVWriteOption func(*csvWriteConfig) + func CSVWriteHeader(write bool) CSVWriteOption + func CSVWriteIndex(write bool) CSVWriteOption + func CSVWriteLineTerminator(s string) CSVWriteOption + func CSVWriteNARep(s string) CSVWriteOption + func CSVWriteSeparator(c byte) CSVWriteOption + type Column struct + Data any + Name string + func Col(name string, data any) Column + type ConcatOptions struct + Axis int + IgnoreIndex bool + Inner bool + type DType uint8 + const Bool + const Category + const Complex128 + const Complex64 + const Datetime + const Float32 + const Float64 + const Int16 + const Int32 + const Int64 + const Int8 + const Period + const String + const Uint16 + const Uint32 + const Uint64 + const Uint8 + func ParseDType(name string) (DType, error) + func (d DType) IsNumeric() bool + func (d DType) String() string + type DataFrame struct + func Concat(frames ...*DataFrame) (*DataFrame, error) + func ConcatWith(opts ConcatOptions, frames ...*DataFrame) (*DataFrame, error) + func FromArray(a *ndarray.Array, names ...string) (*DataFrame, error) + func FromSeries(series ...*Series) (*DataFrame, error) + func Merge(left, right *DataFrame, opts MergeOptions) (*DataFrame, error) + func New(cols ...Column) (*DataFrame, error) + func ReadCSV(r io.Reader, opts ...CSVOption) (*DataFrame, error) + func ReadCSVFile(path string, opts ...CSVOption) (*DataFrame, error) + func (df *DataFrame) Add(other any) (*DataFrame, error) + func (df *DataFrame) Apply(name string, f func(Row) any) (*Series, error) + func (df *DataFrame) ApplyColumns(f func(*Series) (*Series, error)) (*DataFrame, error) + func (df *DataFrame) AsType(dtypes map[string]DType) (*DataFrame, error) + func (df *DataFrame) AsTypeAll(dt DType) (*DataFrame, error) + func (df *DataFrame) At(label any, column string) (any, error) + func (df *DataFrame) BFill() *DataFrame + func (df *DataFrame) Column(name string) (*Series, error) + func (df *DataFrame) ColumnAt(i int) (*Series, error) + func (df *DataFrame) Columns() []string + func (df *DataFrame) Copy() *DataFrame + func (df *DataFrame) Count() *Series + func (df *DataFrame) DTypes() []DType + func (df *DataFrame) DTypesSeries() *Series + func (df *DataFrame) Describe() *DataFrame + func (df *DataFrame) Display() map[string][]byte + func (df *DataFrame) Div(other any) (*DataFrame, error) + func (df *DataFrame) Drop(names ...string) (*DataFrame, error) + func (df *DataFrame) DropNA(subset ...string) (*DataFrame, error) + func (df *DataFrame) DropNAAll(subset ...string) (*DataFrame, error) + func (df *DataFrame) DropNAColumns() *DataFrame + func (df *DataFrame) DropNAThresh(thresh int, subset ...string) (*DataFrame, error) + func (df *DataFrame) Eval(expr string, vars ...map[string]any) (*Series, error) + func (df *DataFrame) FFill() *DataFrame + func (df *DataFrame) FillNA(v any) *DataFrame + func (df *DataFrame) FillNAColumns(values map[string]any) (*DataFrame, error) + func (df *DataFrame) Filter(mask any) (*DataFrame, error) + func (df *DataFrame) GroupBy(keys ...string) (*GroupBy, error) + func (df *DataFrame) HTML() string + func (df *DataFrame) Head(n int) *DataFrame + func (df *DataFrame) IAt(i, j int) (any, error) + func (df *DataFrame) Iloc(rows Selector, cols ...Selector) (*DataFrame, error) + func (df *DataFrame) Index() *Index + func (df *DataFrame) IsNA() *DataFrame + func (df *DataFrame) Join(other *DataFrame, how, lsuffix, rsuffix string) (*DataFrame, error) + func (df *DataFrame) Len() int + func (df *DataFrame) Loc(rows Selector, cols ...string) (*DataFrame, error) + func (df *DataFrame) Max() *Series + func (df *DataFrame) Mean() *Series + func (df *DataFrame) Median() *Series + func (df *DataFrame) Melt(idVars, valueVars []string) (*DataFrame, error) + func (df *DataFrame) Merge(right *DataFrame, opts MergeOptions) (*DataFrame, error) + func (df *DataFrame) Min() *Series + func (df *DataFrame) Mul(other any) (*DataFrame, error) + func (df *DataFrame) NotNA() *DataFrame + func (df *DataFrame) Pivot(index, columns, values string) (*DataFrame, error) + func (df *DataFrame) PivotTable(index, columns, values, aggfunc string) (*DataFrame, error) + func (df *DataFrame) Query(expr string, vars ...map[string]any) (*DataFrame, error) + func (df *DataFrame) Reindex(labels any) (*DataFrame, error) + func (df *DataFrame) ReindexColumns(names ...string) *DataFrame + func (df *DataFrame) Rename(names map[string]string) *DataFrame + func (df *DataFrame) Resample(rule string) (*Resampler, error) + func (df *DataFrame) ResampleOn(column, rule string) (*Resampler, error) + func (df *DataFrame) ResetIndex(drop bool) *DataFrame + func (df *DataFrame) Round(decimals int) *DataFrame + func (df *DataFrame) Select(names ...string) (*DataFrame, error) + func (df *DataFrame) Series() []*Series + func (df *DataFrame) SetColumns(names ...string) (*DataFrame, error) + func (df *DataFrame) SetIndex(columns ...string) (*DataFrame, error) + func (df *DataFrame) Shape() (rows, cols int) + func (df *DataFrame) Shift(n int) *DataFrame + func (df *DataFrame) SortIndex(ascending bool) *DataFrame + func (df *DataFrame) SortValues(by []string, ascending ...bool) (*DataFrame, error) + func (df *DataFrame) Stack() (*Series, error) + func (df *DataFrame) Std() *Series + func (df *DataFrame) String() string + func (df *DataFrame) Sub(other any) (*DataFrame, error) + func (df *DataFrame) Sum() *Series + func (df *DataFrame) T() *DataFrame + func (df *DataFrame) Tail(n int) *DataFrame + func (df *DataFrame) ToPeriod(freq string) (*DataFrame, error) + func (df *DataFrame) Unstack() (*DataFrame, error) + func (df *DataFrame) Values() (*ndarray.Array, error) + func (df *DataFrame) Var() *Series + func (df *DataFrame) WithColumn(name string, data any) (*DataFrame, error) + func (df *DataFrame) WithIndex(ix *Index) (*DataFrame, error) + func (df *DataFrame) WriteCSV(w io.Writer, opts ...CSVWriteOption) error + func (df *DataFrame) WriteCSVFile(path string, opts ...CSVWriteOption) error + type DatetimeFields struct + func (d DatetimeFields) Day() *Series + func (d DatetimeFields) DayOfWeek() *Series + func (d DatetimeFields) DayOfYear() *Series + func (d DatetimeFields) Hour() *Series + func (d DatetimeFields) Minute() *Series + func (d DatetimeFields) Month() *Series + func (d DatetimeFields) Normalize() *Series + func (d DatetimeFields) Second() *Series + func (d DatetimeFields) Strftime(layout string) *Series + func (d DatetimeFields) Year() *Series + type GroupBy struct + func (g *GroupBy) Agg(specs ...AggSpec) (*DataFrame, error) + func (g *GroupBy) Apply(f func(key any, group *DataFrame) (*DataFrame, error)) (*DataFrame, error) + func (g *GroupBy) Count() (*DataFrame, error) + func (g *GroupBy) First() (*DataFrame, error) + func (g *GroupBy) Groups() ([]any, []*DataFrame) + func (g *GroupBy) Last() (*DataFrame, error) + func (g *GroupBy) Max() (*DataFrame, error) + func (g *GroupBy) Mean() (*DataFrame, error) + func (g *GroupBy) Median() (*DataFrame, error) + func (g *GroupBy) Min() (*DataFrame, error) + func (g *GroupBy) NGroups() int + func (g *GroupBy) NUnique() (*DataFrame, error) + func (g *GroupBy) Select(columns ...string) (*GroupBy, error) + func (g *GroupBy) Size() *Series + func (g *GroupBy) Std() (*DataFrame, error) + func (g *GroupBy) String() string + func (g *GroupBy) Sum() (*DataFrame, error) + func (g *GroupBy) Transform(column, fn string) (*Series, error) + func (g *GroupBy) Var() (*DataFrame, error) + type Index struct + func NewIndex(name string, data any) (*Index, error) + func NewRangeIndex(n int) *Index + func (ix *Index) DType() DType + func (ix *Index) Display() map[string][]byte + func (ix *Index) Get(label any) ([]int, error) + func (ix *Index) IsRange() bool + func (ix *Index) Label(i int) any + func (ix *Index) Labels() []any + func (ix *Index) Len() int + func (ix *Index) Level(k int) (*Series, error) + func (ix *Index) NLevels() int + func (ix *Index) Name() string + func (ix *Index) Names() []string + func (ix *Index) Rename(names ...string) (*Index, error) + func (ix *Index) String() string + func (ix *Index) Values() (*ndarray.Array, error) + type MergeOptions struct + How string + Indicator bool + LeftOn []string + On []string + RightOn []string + Suffixes [2]string + type Resampler struct + func (r *Resampler) Agg(specs ...AggSpec) (*DataFrame, error) + func (r *Resampler) Count() (*DataFrame, error) + func (r *Resampler) First() (*DataFrame, error) + func (r *Resampler) Last() (*DataFrame, error) + func (r *Resampler) Max() (*DataFrame, error) + func (r *Resampler) Mean() (*DataFrame, error) + func (r *Resampler) Median() (*DataFrame, error) + func (r *Resampler) Min() (*DataFrame, error) + func (r *Resampler) Size() *Series + func (r *Resampler) Std() (*DataFrame, error) + func (r *Resampler) Sum() (*DataFrame, error) + type Rolling struct + func (r *Rolling) Max() *Series + func (r *Rolling) Mean() *Series + func (r *Rolling) Median() *Series + func (r *Rolling) Min() *Series + func (r *Rolling) Std() *Series + func (r *Rolling) Sum() *Series + type Row struct + func (r Row) Float(column string) float64 + func (r Row) Get(column string) any + func (r Row) Label() any + func (r Row) Position() int + type Selector struct + func All() Selector + func LabelRange(from, to any) Selector + func Labels(l ...any) Selector + func Mask(m any) Selector + func Pos(i ...int) Selector + func Slice(start, stop int) Selector + func SliceFrom(start int) Selector + type Series struct + func ConcatSeries(series ...*Series) (*Series, error) + func NewCategorical(name string, codes []int32, categories []string) (*Series, error) + func NewSeries(name string, data any) (*Series, error) + func NewSeriesBitmap(name string, data any, validity []uint64) (*Series, error) + func NewSeriesIndexed(name string, data any, index *Index) (*Series, error) + func NewSeriesMasked(name string, data any, valid []bool) (*Series, error) + func ToDatetime(s *Series, layout ...string) (*Series, error) + func (s *Series) Abs() (*Series, error) + func (s *Series) Add(other any) (*Series, error) + func (s *Series) Agg(name string) (any, error) + func (s *Series) And(o *Series) (*Series, error) + func (s *Series) AsType(dt DType) (*Series, error) + func (s *Series) At(i int) (any, error) + func (s *Series) BFill() *Series + func (s *Series) Between(lo, hi any) (*Series, error) + func (s *Series) Categorical() (codes []int32, categories []string, err error) + func (s *Series) Copy() *Series + func (s *Series) Count() int + func (s *Series) CumMax() (*Series, error) + func (s *Series) CumMin() (*Series, error) + func (s *Series) CumProd() (*Series, error) + func (s *Series) CumSum() (*Series, error) + func (s *Series) DType() DType + func (s *Series) Diff(n int) (*Series, error) + func (s *Series) Display() map[string][]byte + func (s *Series) Div(other any) (*Series, error) + func (s *Series) DropNA() *Series + func (s *Series) Dt() (DatetimeFields, error) + func (s *Series) Eq(other any) (*Series, error) + func (s *Series) FFill() *Series + func (s *Series) FillNA(v any) (*Series, error) + func (s *Series) Filter(mask any) (*Series, error) + func (s *Series) Floats() ([]float64, error) + func (s *Series) FloorDiv(other any) (*Series, error) + func (s *Series) Ge(other any) (*Series, error) + func (s *Series) Get(label any) (any, error) + func (s *Series) Gt(other any) (*Series, error) + func (s *Series) HTML() string + func (s *Series) Head(n int) *Series + func (s *Series) Iloc(sel Selector) (*Series, error) + func (s *Series) Index() *Index + func (s *Series) IsIn(values ...any) (*Series, error) + func (s *Series) IsNA() *Series + func (s *Series) Items() []any + func (s *Series) Le(other any) (*Series, error) + func (s *Series) Len() int + func (s *Series) Loc(sel Selector) (*Series, error) + func (s *Series) Lt(other any) (*Series, error) + func (s *Series) Map(f func(any) any) (*Series, error) + func (s *Series) MapFloat(f func(float64) float64) (*Series, error) + func (s *Series) Max() any + func (s *Series) Mean() float64 + func (s *Series) Median() float64 + func (s *Series) Min() any + func (s *Series) Mod(other any) (*Series, error) + func (s *Series) Mul(other any) (*Series, error) + func (s *Series) NUnique() int + func (s *Series) Name() string + func (s *Series) Ne(other any) (*Series, error) + func (s *Series) Neg() (*Series, error) + func (s *Series) Not() (*Series, error) + func (s *Series) NotNA() *Series + func (s *Series) Or(o *Series) (*Series, error) + func (s *Series) PctChange(n int) (*Series, error) + func (s *Series) Pow(other any) (*Series, error) + func (s *Series) Prod() float64 + func (s *Series) Quantile(q float64) float64 + func (s *Series) Reindex(labels any) (*Series, error) + func (s *Series) Rename(name string) *Series + func (s *Series) ResetIndex() *Series + func (s *Series) Rolling(window int) (*Rolling, error) + func (s *Series) RollingMin(window, minPeriods int) (*Rolling, error) + func (s *Series) Round(decimals int) *Series + func (s *Series) SetIndex(ix *Index) (*Series, error) + func (s *Series) Shift(n int) *Series + func (s *Series) SortIndex(ascending bool) *Series + func (s *Series) SortValues(ascending bool) *Series + func (s *Series) Std() float64 + func (s *Series) String() string + func (s *Series) Strings() []string + func (s *Series) Sub(other any) (*Series, error) + func (s *Series) Sum() float64 + func (s *Series) SumValue() any + func (s *Series) Tail(n int) *Series + func (s *Series) ToFrame() *DataFrame + func (s *Series) ToPeriod(freq string) (*Series, error) + func (s *Series) ToTimestamp() (*Series, error) + func (s *Series) Unique() *Series + func (s *Series) Unstack() (*DataFrame, error) + func (s *Series) Valid() []bool + func (s *Series) ValidityBitmap() []uint64 + func (s *Series) ValueCounts() *Series + func (s *Series) Values() (*ndarray.Array, error) + func (s *Series) Var() float64 + func (s *Series) VarDDOF(ddof int) float64 + func (s *Series) Xor(o *Series) (*Series, error)