Pandas with different length arrays Pandas with different length arrays arrays arrays

Pandas with different length arrays


I'm not sure that this is exactly what you want, but anyway:

d = dict(tweets=tweetlist, users=userlist)pandas.DataFrame({k : pandas.Series(v) for k, v in d.iteritems()})


Try this:

frame = pandas.DataFrame.from_dict(d, orient='index')

After that, you should transpose your frame with:

frame = frame.transpose()

Then you can export to csv:

frame.to_csv('#parsed.csv', index=False)