pandas

package
v0.0.0-...-a103044 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package pandas contains functionality that mirrors python's popular pandas library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropNil

func DropNil(ctx context.Context, sdf interface{}, lock bool) error

DropNil drops all rows that contain nil values.

func FillNil

func FillNil(ctx context.Context, replaceVal interface{}, sdf interface{}, lock bool) error

FillNil replaces all nil values with replaceVal. When applied to a DataFrame, replaceVal must be of type map[interface{}]interface{}, where the key is the Series name or Series index.

Note: Not all Series recognise the type of replaceVal. The function will panic on such a scenario. A string is recognised by all built-in Series types.

Types

type DescribeOptions

type DescribeOptions struct {

	// Percentiles sets which Quantiles to return.
	Percentiles []float64

	// Whitelist sets which Series to provide statistics for.
	Whitelist []interface{}

	// Blacklist sets which Series to NOT provide statistics for.
	Blacklist []interface{}
}

DescribeOptions configures what Describe should return or display.

type DescribeOutput

type DescribeOutput struct {
	Count       []int
	NilCount    []int
	Median      []float64
	Mean        []float64
	StdDev      []float64
	Min         []float64
	Max         []float64
	Percentiles [][]float64
	// contains filtered or unexported fields
}

DescribeOutput contains statistical data for a DataFrame or Series. Despite the fields being exported, it is not intended to be inspected. Use the String function to view the information in a table format.

func Describe

func Describe(ctx context.Context, sdf interface{}, opts ...DescribeOptions) (DescribeOutput, error)

Describe outputs various statistical information a Series or Dataframe.

See: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.describe.html#pandas.DataFrame.describe

func (DescribeOutput) String

func (do DescribeOutput) String() string

String implements the Stringer interface in the fmt package.

type SpecialFillNilValue

type SpecialFillNilValue int

SpecialFillNilValue is a special value type for the FillNil function.

const (
	// Mean will fill Nil values with the mean.
	Mean SpecialFillNilValue = 0

	// Sum will fill Nil values with the sum.
	Sum SpecialFillNilValue = 1
)

Jump to

Keyboard shortcuts

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