1# Short answer:
2# The simplest approach is to make a dictionary from the lists and then
3# to convert the dictionary to a Pandas dataframe.
4
5# Example usage:
6import pandas as pd
7
8# Lists you want to convert to a Pandas dataframe
9months = ['Jan','Apr','Mar','June']
10days = [31, 30, 31, 30]
11
12# Make dictionary, keys will become dataframe column names
13intermediate_dictionary = {'Month':months, 'Day':days}
14
15# Convert dictionary to Pandas dataframe
16pandas_dataframe = pd.DataFrame(intermediate_dictionary)
17
18print(pandas_dataframe)
19 Month Day
200 Jan 31
211 Apr 30
222 Mar 31
233 June 30
1# Python 3 to get list of tuples from two lists
2data_tuples = list(zip(Month,Days))
3data_tuples
4[('Jan', 31), ('Apr', 30), ('Mar', 31), ('June', 30)]
5
6>pd.DataFrame(data_tuples, columns=['Month','Day'])
7 Month Day
80 Jan 31
91 Apr 30
102 Mar 31
113 June 30