Skip to content

Conversation

@AndreiKingsley
Copy link
Collaborator

@Jolanrensen Jolanrensen self-requested a review June 26, 2025 11:19
* `add` operation adds new columns to DataFrame.
*/

// region Add existing columns
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of repetitions here, but probably okay if we don't have to change it often in the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's hard to find exact repetitions that can be replaces with kodex templates 😢.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done for add expression description

* Creates a new column using [AddExpression] and
* adds a new column to the end of this [DataFrame] (at the top level).
*
* An [AddExpression] allows to compute a value for each row in the new column
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds a bit unnatural.

With [expression] you can define the value each row in the new column needs to have. This can be based on the values from that row in the original dataframe.

@Jolanrensen Jolanrensen changed the title add kdocs add kdocs Jun 26, 2025
* Original [DataFrame] is not modified.
* You can also use functions like [prev] and [next] to access other rows, and combine them with
* [newValue][AddDataRow.newValue] to reference values already computed in the new column.
* For example, use `prev().newValue()` to access the new column value from the previous row.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! very clear

@AndreiKingsley AndreiKingsley merged commit 05b50ba into master Jun 27, 2025
5 of 6 checks passed
@AndreiKingsley AndreiKingsley deleted the add_kdocs branch June 27, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants