Skip to content

Conversation

@koperagen
Copy link
Collaborator

@koperagen koperagen commented Jan 27, 2025

#1028

For DataRow.isEmpty and DataRow.isNotEmpty is hard to imagine situation where it'd be used
DataFrame.copy is useless
DataRow.getRows() is a short cut that can be easily replaced, and also hard to imagine a usecase

@koperagen koperagen self-assigned this Jan 27, 2025
@koperagen koperagen force-pushed the candidate-for-removal branch 2 times, most recently from c58096a to cc307f1 Compare January 28, 2025 12:53
@Jolanrensen Jolanrensen self-requested a review January 28, 2025 13:52
import kotlin.reflect.KType

@CandidateForRemoval
public fun AnyRow.isEmpty(): Boolean = owner.columns().all { it[index] == null }
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be moved to internal maybe? it's used at least once


public fun AnyRow.columnTypes(): List<KType> = df().columnTypes()

@CandidateForRemoval
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these ones should just be documented and better tested. It's in the same family of functions as relative which is powerful in the add DSL. And to populate a column with values using, for instance getRow(0).someCol as part of the calculation seems quite critical. Again, we just need more examples. Though, marking them as CandidateForRemoval is a good way for us to start looking into it again later :)

@koperagen koperagen force-pushed the candidate-for-removal branch from cc307f1 to 633bc9e Compare January 29, 2025 11:09
@koperagen koperagen merged commit a9e70da into master Jan 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants