Skip to content

Conversation

CarloMariaProietti
Copy link
Contributor

Solving issue #1098

@Jolanrensen
Copy link
Collaborator

@koperagen do you think it will cause issues in combination with #1465 ? or should this be good to go?

@koperagen
Copy link
Collaborator

@koperagen do you think it will cause issues in combination with #1465 ? or should this be good to go?

No issues, but in Iterable.toDataFrame we'll treat Map as value type and won't unfold it. I think it makes sense as a default

So results would be,

  1. With this new function
    listOf(mapOf("a" to 123)).toDataFrame() =>
a: Int
  1. With generic toDataFrame and deep conversion
class MapContainer(val myMap: Map<String, *>)

listOf(MapContainer(mapOf("a" to 123))).toDataFrame(maxDepth = 2)

=>

myMap: Map<String, *>
  1. Later Map can be converted
    df.convert { myMap }.with { it.toDataRow() }

@Jolanrensen
Copy link
Collaborator

@koperagen and what about listOf(myMap, 1, "").toDataFrame()? This is what I'm most concerned about

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