I have below gota dataframe and I want to have another column which contains max value of column B and C.
this can be done easily with pandas dataframe, is there any way in Go also?
* go data frame
func main() {
df := dataframe.LoadRecords(
[][]string{
[]string{"A", "B", "C", "D"},
[]string{"a", "4", "5", "true"},
[]string{"k", "5", "7", "true"},
[]string{"k", "4", "2", "true"},
[]string{"a", "2", "1", "false"},
},
)
}
* Solution in python
df["Maximum"] = df[["B", "C"]].max(axis=1)