Skip to content

Commit 281902d

Browse files
authored
Merge pull request #1446 from Kotlin/ileasile/geo-df-rendering
Fix NPE in GeoDataFrame rendering
2 parents 273d8d9 + bfa582d commit 281902d

File tree

1 file changed

+5
-4
lines changed
  • dataframe-geo-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter

1 file changed

+5
-4
lines changed

dataframe-geo-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/IntegrationGeo.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import org.jetbrains.kotlinx.jupyter.api.FieldHandler
1515
import org.jetbrains.kotlinx.jupyter.api.FieldHandlerExecution
1616
import org.jetbrains.kotlinx.jupyter.api.libraries.FieldHandlerFactory
1717
import org.jetbrains.kotlinx.jupyter.api.libraries.JupyterIntegration
18-
import org.jetbrains.kotlinx.jupyter.api.outputs.display
1918
import kotlin.reflect.KProperty
2019
import kotlin.reflect.full.isSubtypeOf
2120
import kotlin.reflect.typeOf
@@ -55,9 +54,11 @@ internal class IntegrationGeo : JupyterIntegration() {
5554
useSchema<WithMultiLineStringGeometry>()
5655
}
5756

58-
render<GeoDataFrame<*>> {
59-
notebook.display("GeoDataFrame with ${it.crs?.name?.code} CRS and inner dataframe:")
60-
it.df
57+
renderWithHost<GeoDataFrame<*>> { host, geoDataFrame ->
58+
host.execute {
59+
display("GeoDataFrame with ${geoDataFrame.crs?.name?.code} CRS and inner dataframe:", null)
60+
}
61+
geoDataFrame.df
6162
}
6263

6364
val replCodeGeneratorImpl = ReplCodeGeneratorImpl()

0 commit comments

Comments
 (0)