We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggested API:
class MyWrapper(val value: Int) //either global configuration DataFrame.parsers.add( stringParser { if(it.endsWith("%")) it.dropLast(1).toIntOrNull()?.let { MyWrapper(it) } else null } ) // or provide instance here val df = dataFrameOf("a","b")("55%", "12%").parse(/*ParserOptions(...)*/) df["a"].type() shouldBe typeOf<MyWrapper>() df["b"].type() shouldBe typeOf<MyWrapper>()
Should save some effort manually selecting columns for conversion or writing a complex column selector that should somehow tell column can be parsed.
dataFrameOf("a","b")("55%", "12%").convert { colsAtAnyDepth() .colsOf<String>() .filter { it.values().all { it.toPercentageOrNull() != null } } }.with { it.toPercentageOrNull()!! }
Instead, all you'd need to define is (String) -> YourType? function
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Suggested API:
Should save some effort manually selecting columns for conversion or writing a complex column selector that should somehow tell column can be parsed.
Instead, all you'd need to define is (String) -> YourType? function
The text was updated successfully, but these errors were encountered: