Skip to content
Advertisement

Creating a data frame from a list of lists with empty lists

Suppose we have some lists lst1 and lst2 and we want to create a data frame from them. So:

JavaScript

When I try to create a data frame from these lists, it is empty:

JavaScript

Is there any easy way to add the lst2 column even though it is empty?

Advertisement

Answer

There may be a more appropriate way to do this, but this’ll work:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement