Skip to content

Add documentation and tests for DataColumnArithmetics.kt#1769

Open
Allex-Nik wants to merge 6 commits intomasterfrom
data-column-arithmetics-docs-tests
Open

Add documentation and tests for DataColumnArithmetics.kt#1769
Allex-Nik wants to merge 6 commits intomasterfrom
data-column-arithmetics-docs-tests

Conversation

@Allex-Nik
Copy link
Copy Markdown
Collaborator

@Allex-Nik Allex-Nik commented Mar 26, 2026

Fixes #530

Added:

  • KDocs
  • Tests
  • Website documentation

for DataColumnArithmetics.kt

@Allex-Nik Allex-Nik added documentation Improvements or additions to documentation (not KDocs) KDocs Improvements or additions to KDocs tests Something related to the JUnit tests, integration tests or testing infrastructure labels Mar 26, 2026
@Allex-Nik Allex-Nik marked this pull request as ready for review March 26, 2026 15:47
Copy link
Copy Markdown
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

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

thanks! :D

@Allex-Nik Allex-Nik force-pushed the data-column-arithmetics-docs-tests branch from e6cf6f1 to 3ed1f51 Compare March 30, 2026 16:12

In most transformations, these column operations are usually not the preferred approach in Kotlin DataFrame,
because the library provides row-based APIs such as [`add`](add.md), [`update`](update.md), [`map`](map.md), and `expr`,
which are usually recommended.
Copy link
Copy Markdown
Collaborator

@koperagen koperagen Mar 31, 2026

Choose a reason for hiding this comment

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

Please elaborate on expr { } as a column selector => row expression adapter
for example,
df.groupBy { city + "mySuffix" } is equivalent to
df.groupBy { expr { city + "mySuffix" } }, but in expr city is seen as single String value, not as column

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done :)
Please see if it is correct now. I tried to explain the expr usage and included similar examples. I also specified the name of the column for expr (so that the results for both versions look the same), otherwise the column was called "untitled" for the version with expr, whereas in the version without expr the column had a specific name. Is that fine?

Copy link
Copy Markdown
Collaborator

@AndreiKingsley AndreiKingsley left a comment

Choose a reason for hiding this comment

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

Great KoDEx usage!

@Allex-Nik Allex-Nik force-pushed the data-column-arithmetics-docs-tests branch from 3ed1f51 to 4d60e09 Compare March 31, 2026 16:39
@Allex-Nik Allex-Nik requested a review from koperagen March 31, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation (not KDocs) KDocs Improvements or additions to KDocs tests Something related to the JUnit tests, integration tests or testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document and test DataColumnArithmetics.kt

5 participants