Peter
09/02/2022, 7:58 AMPeter
09/05/2022, 7:44 AMml.c5.xlarge
but that is mainly because of some more CPU intensive calculations. A cheaper EC2 instance type should be fine for simpler work-loads.
Since there is no out-of-the-box support for Kotlin kernels, you’ll have to provide a “lifecycle script” that will install the required packages. You can find more info including the lifecycle script I created at https://roboquant.org/tutorial/install.html#_aws_sagemaker
But basically it boils down to installing these two packages when the notebook instance is created:
conda install -y openjdk
conda install -y -c jetbrains kotlin-jupyter-kernel
That is all. And the above is only done once during creation and after that when you start/stop the notebook it is just like any other notebook.
If you have any questions, feel free to post them.Peter
09/05/2022, 10:43 AM"function"==typeof define
With
"function"==typeof define_none_existing
Of course if you load the script from a CDN, changing the code is not possible. But if you load it from resources directory (classPath option in your JupyterIntegration implementation) it is an easy change for most JavaScript libraries.
Future better workaround:
=====================
The code that Kotlin kernel generates to embed external JavaScript libraries could take care of this behaviour. It could detect requirejs presence and change it loading behavior. But this requires more investigation.Didier Villevalois
09/07/2022, 9:03 AMkotlinx.datetime.Instant
column timestamp
and would like to add a new column with the difference between the timestamps of the current row and the previous row. It seems I would need something similar to Panda's diff
operation but I can't find anything in Kotlin DataFrame documentation. How can I do this?Jilles van Gurp
09/22/2022, 8:12 AMholgerbrandl
09/25/2022, 6:10 PMDenis Ambatenne
10/06/2022, 10:40 AMEmerson Farrugia
10/23/2022, 9:16 PMplugins {
kotlin("jvm") version "1.7.20"
id("org.jetbrains.kotlinx.dataframe") version "0.8.1"
}
During compilation, I get the warning:
ksp-1.7.10-1.0.6 is too old for kotlin-1.7.20. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.7.10.
And when I try to run the code, I get the error in the 🧵. Is there a way to “upgrade ksp”, or is that something DataFrame would need to do?Carter
10/24/2022, 5:12 PMjmfayard
10/24/2022, 10:06 PMPeter
11/04/2022, 10:01 AMexec
method to run a cell.
for (cell in notebook.cells.filterIsInstance<CodeCell>()) {
val cellResult = exec(cell.source)
val result = if (cellResult is MimeTypedResult) cellResult.entries.first().value else cellResult.toString()
if (cell.outputs.isNotEmpty()) {
val firstOutput = cell.outputs.first()
if (firstOutput is ExecuteResult && firstOutput.data.isNotEmpty()) {
val output = firstOutput.data.entries.first()
assertEquals(output.value.removeUUID(), result.removeUUID())
}
}
}
But some cells take very long to run, so I would like to have the option to only compile the cell and get compilation errors, but not run (exec) the cell. Any hints how to achieve this?Alexandre Brown
11/14/2022, 6:57 PMPeter
11/19/2022, 7:50 AMYingding Wang
11/21/2022, 9:41 PMPaulo Cereda
11/25/2022, 8:38 AM.csv
file (exported from a third-party system) which has integer columns with ,
as thousands separator (e.g, 47,302
, 48,000
). Needless to say, this is potentially problematic. 😅 When I load my .csv
file into my Jupyter notebook, I believe dataframe
relies on my system locale (pt_BR
) and thus parses these integer columns as doubles — pt_BR
has ,
as decimal separator and .
as thousands separator. I end up having wrong values in those columns (.csv
is of course to blame, not dataframe
). So I was wondering if I could (a) disable type inference for either the entire .csv
or selected columns and get everything as string, so I can manually parse these values, (b) change the underlying locale and see if it helps the type inference mechanism, or (c) have parsing rules associated to certain columns. Any suggestions are highly appreciated! I apologise in advance if this is trivial, but I failed to identify a similar scenario in the documentation. Cheers! :thank-you:holgerbrandl
11/26/2022, 1:13 PMstefano
11/28/2022, 12:35 PMJolan Rensen [JB]
12/02/2022, 1:12 PMBigInteger
support in #182 thanks to #181
• New Spark versions: 3.2.3, 3.3.1, 3.2.2
• New Scala versions: 2.12.17, 2.13.10
• Updated Kotlin to 1.7.20
• Small bugfix regarding Map encoding
You can get the version that works with your Spark/Scala setup using the following table: https://github.com/Kotlin/kotlin-spark-api#supported-versions-of-apache-spark
(Might take a couple of hours for Maven Central to update)JCollardBovy
12/06/2022, 6:18 PMroman.belov
12/14/2022, 12:37 PMholgerbrandl
12/21/2022, 2:29 PMPeter
12/30/2022, 11:43 AMJolan Rensen [JB]
01/09/2023, 12:48 PMDidier Villevalois
01/10/2023, 12:53 PM0.11.0.208
version.
However, everytime I launch jupyter notebook
and connect to it with the Kotlin Notebook IDEA plugin I get told that the kernel version (0.1.0-170) is incompatible the kotlin-dataframe version.
If I scroll at the top of the log, I can see that indeed it tries to use the 0.11.0-170 version:
Kernel args: /tmp/kotlin-kernel-config-kernelProcessConnection15069667844898789499.json, -home=/tmp/kernelProcess16547460509079481210, -cp=/tmp/kernelProcess16547460509079481210/lib/kotlin-jupyter-api-0.11.0-170.jar:/tmp...
Deleting the /tmp/kernelProcess*
directories changes nothing.Viktor Sirotin
01/12/2023, 7:08 AMholgerbrandl
01/20/2023, 7:54 PMholgerbrandl
01/20/2023, 11:02 PMirisData.groupBy("Species").summarizeAt({ all() }, SumFuns.mean)
. How could I rewrite this to use kotlin-dataframe instead? Essentially I want to summarize all columns in a grouped data-frame to their mean. Conceptually, one may even want to use different aggregators here to not compute mean but also standard deviation or other aggregates at once. (cc @Jolan Rensen [JB])roman.belov
01/25/2023, 5:55 PMViktor Sirotin
01/28/2023, 4:17 PMholgerbrandl
01/28/2023, 10:39 PMval student by columnOf("Alice", "Bob")
, how does the dataframe library detect the variable name? Is it some type of reflection?holgerbrandl
01/28/2023, 10:39 PMval student by columnOf("Alice", "Bob")
, how does the dataframe library detect the variable name? Is it some type of reflection?Ilya Muradyan
01/28/2023, 10:58 PMcolumnOf
returns specific property delegateholgerbrandl
01/29/2023, 4:46 PM