Documentation
¶
Overview ¶
Package pd (aka GoPandas) is a library for cleaning, manipulating, and reshaping 2-dimensional data from a spreadsheet or table. GoPandas combines a flexibile API familiar to Python pandas users with the strengths of Go, including type safety, predictable error handling, and concurrent processing.
Index ¶
- func DataFrame(data []interface{}, config ...Config) (*dataframe.DataFrame, error)
- func ReadCSV(path string, config ...ReadOptions) (*dataframe.DataFrame, error)
- func ReadInterface(input [][]interface{}, config ...ReadOptions) (*dataframe.DataFrame, error)
- func Series(data interface{}, config ...Config) (*series.Series, error)
- type Config
- type ReadOptions
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataFrame ¶
DataFrame constructs a new DataFrame.
Example (Default) ¶
df, _ := DataFrame([]interface{}{[]string{"foo", "bar", "baz"}, []int{7, 11, 19}})
fmt.Println(df)
Output: 0 1 0 foo 7 1 bar 11 2 baz 19
func ReadCSV ¶
func ReadCSV(path string, config ...ReadOptions) (*dataframe.DataFrame, error)
ReadCSV converts a CSV file into a DataFrame.
func ReadInterface ¶
func ReadInterface(input [][]interface{}, config ...ReadOptions) (*dataframe.DataFrame, error)
ReadInterface converts [][]interface{}{row1{col1, ...}...} into a DataFrame
Types ¶
type Config ¶
type Config struct {
Name string
DataType options.DataType
Index interface{}
IndexName string
MultiIndex []interface{}
MultiIndexNames []string
Col []string
ColName string
MultiCol [][]string
MultiColNames []string
Manual bool
}
Config customizes the construction of either a DataFrame or Series.
Directories
¶
| Path | Synopsis |
|---|---|
|
benchmarking
|
|
|
profiler
command
|
|
|
Package dataframe defines the DataFrame, a 2-dimensional data structure with an n-level index, n-level column headers, and columns of typed data.
|
Package dataframe defines the DataFrame, a 2-dimensional data structure with an n-level index, n-level column headers, and columns of typed data. |
|
internal
|
|
|
index
Package index is an internal collection of data structures and methods for constructing and modifying n-level indexes and column headers.
|
Package index is an internal collection of data structures and methods for constructing and modifying n-level indexes and column headers. |
|
values
Package values is an internal package that powers the values within pd/Series and pd/DataFrame.
|
Package values is an internal package that powers the values within pd/Series and pd/DataFrame. |
|
Package options defines custom DataTypes and settable options for use in constructing, modifying, and displaying DataFrames and Series.
|
Package options defines custom DataTypes and settable options for use in constructing, modifying, and displaying DataFrames and Series. |
|
Package series defines the Series, a typed 1-dimensional data structure with an n-level index, analogous to a column in a spreadsheet.
|
Package series defines the Series, a typed 1-dimensional data structure with an n-level index, analogous to a column in a spreadsheet. |
Click to show internal directories.
Click to hide internal directories.