Joel Dror 2 Posted September 26, 2023 Share Posted September 26, 2023 I want to code a data function using Python.My end game is to compute a polynomial fit on series that I get in a certain column.As a simple example, I tried coding a data function that computes the maximum of a certain column.I coded this:Y = Y.to_numpy(dtype=float, na_value=0)MaxVal = pd.Series([max(Y)]*len(Y))However, I want the series to be grouped by different columns' values.So that I get the maximum of each sub-set, similar to what we can do with:Max([Y]) Over ([ColumnA], [ColumnB])I see there is an R function called group_by that probably does that, but I don't know R at all so I would like to do it with Python.How do I do that?Any help would be appreciated.Thanks,JoelP.S where can I thoroughly learn an R language to use in Spotfire? Link to comment Share on other sites More sharing options...

Gaia Paolini Posted September 29, 2023 Share Posted September 29, 2023 Note: this question was answered by the user here:https://community.spotfire.com/s/question/0D54z00009g9ySjCAI/i-would-like-to-have-a-calculated-column-which-is-a-polynomial-fit-of-my-datadoes-anyone-know-how-its-done-by-terr-script Link to comment Share on other sites More sharing options...

## Recommended Posts

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account## Sign in

Already have an account? Sign in here.

Sign In Now