Create a pandas DataFrame from generator?

前端 未结 5 886
野的像风
野的像风 2020-12-08 07:07

I\'ve create a tuple generator that extract information from a file filtering only the records of interest and converting it to a tuple that generator returns.

I\'ve

5条回答
  •  暖寄归人
    2020-12-08 07:22

    If generator is just like a list of DataFrames, you need just to create a new DataFrame concatenating elements of the list:

    result = pd.concat(list)

    Recently I've faced the same problem.

提交回复
热议问题