go-gota / gota

Gota: DataFrames and data wrangling in Go (Golang)
Other
2.98k stars 276 forks source link

Expose dataframe.print() method to users #127

Open d3an opened 3 years ago

d3an commented 3 years ago

Right now, dataframe.print() is a private method only used by dataframe.String(). Can we expose this method to users, so that they can print a full dataframe if they'd like, instead of just a shortened preview?

Basically, just change dataframe.print() to be dataframe.Print().

streamdp commented 2 years ago

I also think about it, but it seems to me more correct to make parameters in dataframe.String(). Something like:

func (df DataFrame) String(args ...interface{}) (str string) {
}

or

type Parameters struct {
  ShortRow bool
  ShortCol bool 
  ...
}
func (df DataFrame) String(prm Parameters) (str string) {
}

What do you think about this?

jordanh commented 5 months ago

I also think about it, but it seems to me more correct to make parameters in dataframe.String(). Something like...

+1 to this, if there is support I'd be happy to fork and make this PR