Skip to content

Nested Map -> DataRow conversion#1756

Draft
Jolanrensen wants to merge 2 commits intomasterfrom
nested-map-to-datarow
Draft

Nested Map -> DataRow conversion#1756
Jolanrensen wants to merge 2 commits intomasterfrom
nested-map-to-datarow

Conversation

@Jolanrensen
Copy link
Copy Markdown
Collaborator

Fixes #1755

created new overloads for Map<*, *>.toDataRow() expanded with maxDepth and convertKeysToString to allow recursive map -> datarow conversion with key -> string handling

@JvmOverloads is added to avoid bytecode incompatibility between versions.

TODO: Iterable<Map<*, *>>.toDataFrame()

@Jolanrensen
Copy link
Copy Markdown
Collaborator Author

@AndreiKingsley @koperagen
One important thing: what to do about lists/iterables inside the map? Should we convert those too? A Iterable<Map<String, *>> can be seen and converted to a DataFrame after all, making Iterable<String, List<Map<String, *>>> a DataFrame with FrameColumns.

Plus, Map<String, Iterable<*>>'s can also be converted to a DataFrame. Should that be done?

(Also where have I seen this before... oh right JSON objects/arrays -> DataFrame XD)

@Jolanrensen Jolanrensen force-pushed the nested-map-to-datarow branch from 9dc9afd to e602a9b Compare March 23, 2026 11:37
@AndreiKingsley
Copy link
Copy Markdown
Collaborator

Let's add arguments like unfoldInnerIterables = false?

…epth` and `convertKeysToString` to allow recursive map -> datarow conversion with key->string handling
@Jolanrensen Jolanrensen force-pushed the nested-map-to-datarow branch from e602a9b to 5ea9309 Compare March 24, 2026 19:57
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.

Map<String, Any?> to DataRow conversion with nested maps

2 participants