Skip to content

Commit

Permalink
CHANGELOG; Err deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmang-jambit committed Oct 10, 2021
1 parent 8f0ee43 commit d3ca268
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ This project adheres to [Semantic Versioning](http://semver.org/).
This document follows
[markdownlint](https://github.com/markdownlint/markdownlint) formatting rules.

## [0.12.0]
## [0.12.0] - 2021-10-10

### Added in 0.12.0

- Add dataframe.GetGroups (@arjunmahishi)
- Add Series.Slice (@jfussion)
- Add csv lazy quote (@fredericlemoine)

### Changed in 0.12.0

- series.Err is deprecated; use Error() instead
- dataframe.Err is deprecated; use Error() instead

### Fixed in 0.12.0

### Removed in 0.12.0
- Fix dataframe.GroupBy issue (@prliu)
- making series Order stable (@mcolosimo-p4)

## [0.11.0] - 2021-06-27

Expand Down Expand Up @@ -290,3 +298,4 @@ This document follows
[0.10.0]:https://github.com/go-gota/gota/compare/v0.9.0...v0.10.0
[0.10.1]:https://github.com/go-gota/gota/compare/v0.10.0...v0.10.1
[0.11.0]:https://github.com/go-gota/gota/compare/v0.10.1...v0.11.0
[0.12.0]:https://github.com/go-gota/gota/compare/v0.11.0...v0.12.0
9 changes: 8 additions & 1 deletion dataframe/dataframe.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ type DataFrame struct {
columns []series.Series
ncols int
nrows int
Err error

// deprecated: Use Error() instead
Err error
}

// New is the generic DataFrame constructor
Expand Down Expand Up @@ -103,6 +105,11 @@ func (df DataFrame) String() (str string) {
return df.print(true, true, true, true, 10, 70, "DataFrame")
}

// Returns error or nil if no error occured
func (df *DataFrame) Error() error {
return df.Err
}

func (df DataFrame) print(
shortRows, shortCols, showDims, showTypes bool,
maxRows int,
Expand Down
9 changes: 8 additions & 1 deletion series/series.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ type Series struct {
Name string // The name of the series
elements Elements // The values of the elements
t Type // The type of the series
Err error // If there are errors they are stored here

// deprecated: use Error() instead
Err error
}

// Elements is the interface that represents the array of elements contained on
Expand Down Expand Up @@ -234,6 +236,11 @@ func (s Series) Empty() Series {
return New([]int{}, s.t, s.Name)
}

// Returns Error or nil if no error occured
func (s *Series) Error() error {
return s.Err
}

// Append adds new elements to the end of the Series. When using Append, the
// Series is modified in place.
func (s *Series) Append(values interface{}) {
Expand Down

0 comments on commit d3ca268

Please sign in to comment.