how to create a dataframe from two lists in python

# Short answer:
# The simplest approach is to make a dictionary from the lists and then
# to convert the dictionary to a Pandas dataframe.

# Example usage:
import pandas as pd

# Lists you want to convert to a Pandas dataframe
months = ['Jan','Apr','Mar','June']
days = [31, 30, 31, 30]

# Make dictionary, keys will become dataframe column names
intermediate_dictionary = {'Month':months, 'Day':days}

# Convert dictionary to Pandas dataframe
pandas_dataframe = pd.DataFrame(intermediate_dictionary)

print(pandas_dataframe)
	Month	Day
0	Jan		31
1	Apr		30
2	Mar		31
3	June	30

4.13
8
Awgiedawgie 440215 points

                                    # Python 3 to get list of tuples from two lists
data_tuples = list(zip(Month,Days))
data_tuples
[('Jan', 31), ('Apr', 30), ('Mar', 31), ('June', 30)]

>pd.DataFrame(data_tuples, columns=['Month','Day'])
 Month Day
0 Jan 31
1 Apr 30
2 Mar 31
3 June 30

4.13 (8 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
create a df from multiple lists create dataframe with different lists how to create dataframe from multiple list dataframe with two list create a dataframe with two lists python pandas df from lists how to convert multiple list into dataframe in python make a new dataframe with two lists as columns dataframe in pandas with two list two lists in one pandas dataframe pandas create dataframe from two list create data frame from list of list python how to make dataframe from list using pandas create new dataframe from lists in python how to make dataframe of 2 list in python from two lists to pandas creacte pandas graph using multiple lists create a dataframe pandas from list create a data frame from lists create pandas dataframe from lists as columns create dataframe with one lists two list to dataframe how to combine two lists into a dataframe python pandas new dataframe from lists python create dataframe from two lists how to create a pandas dataframe with 2 lists pandas make dataframe from list make pandas df from two lists how to create a dataframe out of multiple lists list of lists to pandas dataframe make two lists into dataframe two lists into dataframe MAKE A DF FROM TWO LISTS PYTHON making dataframe from multiple list how to make a df from lists make dataframe with lists DATAFRAME USING LISTS create dataframe from multiple lists python create df from two list dataframes from list ? python create dataframe from 2 list make df of several lists dataframe from multiple lists make pandas dataframe from 2 lists pandas create a dataframe from lists how to create dataframe from list how to create a dataframe from two or more list in python converting a lists of data to dataframe in python convert two lists to dataframe new dataframe from lists pd take two list python and make dataframe pandas from multiple lists several list to dataframe create dataframe from three lists create dataframe from list of lists multiple lists in dataframe make two lists into dataframe python dataframe of two lists make df from two list pandas build dataframe from two lists create pandas from lists how to make a dataframe from two lists in python create dataframe pandas from list make dataframe from two lists python python dataframe from list of lists python list of lists to dataframe how to make a dataframe from a list combine two lists into dataframe how to create pandas dataframe from lists of columns create a dataframe from multiple list pandas how to make dataframe in python from list pass several list pandas dataframe how to create pandas dataframe from lists pandas build dataframe from lists new dataframe from lists create a dataframe with two list python create pandas dataframe from list build a dataframe out of two lists pandas datafrema from two lists create dataframe with two lists create a dataframe with two lists pandas construct dataframe from lists how ot create dataframe from list pandas make a dataframe from list of data create dataframe from 2 lists python a data frame from two lists dataframe two lists how to convert two list into one dataframe in python dataframe from list of dataframes make dataframe from two lists how to make pandas dataframe from list how to create a dataframe using mutiple lists in python create data frame pandas from 2 lists how to create a dataframe of 2 lists pandas multiple list to dataframe make dataframe from list of list python create dataframe from multiple list make dataframe from list pandas two lists into a dataframe python new dataframe from 2 lists how to convert a pandas dataframe to lists of lists how to make dataframe from list in python pandas list of lists to dataframe how to use pandas dataframe from list dataframe from list of list create dataframe from list of list pandas dataframe from list of lists generate pandas dataframe from two lists make a dataframe from two lists pandas data frame from lists python from two list to dataframe create a pandas df from two list create a dataframe with 2 lists how to create a dataframe from list of lists two lists to a pandas dataframe pandas dataframe from multiple lists pandas datafram taking in multiple lists converting multiple lists to a pandas dataframe create dataframe from 2 lists create a dataframe from lists how to make dataframe from 2 lists how to make list to dataframe turn multiple lists into dataframe combine multiple lists into one dataframe python create pandas dataframe from multiple lists how to create dataframe from multiple lists in python how to create a pandas dataframe from 2 lists several lists into one dataframe pandas dataframe from multiple list python pandas dataframe with two list create a dataframe with multiple lists as columns pandas create data frame from two lists create data frame from lists pandas convert two lists to dataframe how to create a dataframe in python with two lists how to create a dataframe from a list of lists list of lists to dataframe create dataframe from two list create dataframe from 2 list create dataframe from lists python how to convert two lists into a dataframe python make a dataframe from two list create pd dataframe from two lists list of lists to dataframe python python dataframe from two lists pandas dataframe with lists create a dataframe with two lists as columns pandas dataframe from lists python make dataframe from lists how to make a dataframe from two lists making pandas dataframe from lists dataframe from list of lists merge two lists into dataframe python make a dataframe from list of lists how to create a dataframe from multiple lists in python creating a dataframe from a list of lists make dataframe with two lists python pandas dataframe from list of lists dataframe from 2 lists make df out of list create a dataframe from 2 lists how to create a dataframe from lists make dataframe with two lists python how to make dataframe from list list into pandas dataframe several lists to dataframe pandas new dataframe with multiple list how to make a dataframe about list dataframe from lists initialize dataframe from list pandas from a list make dataframe from list of columns multiple list as df dataframe from two arrays make dataframe out of lists how to initialize a dataframe with lists in python how to initialize a data frame with lists in python how to create dataframe from a list in python how to turn two lists into dataframe make df from list of df 2 lists to dataframe dataframe from list pandas pandas make dataframe from two lists create a dataframe from a column list 2 list in one pandas column list to df pandas dataframe from 2 lists create df from list how to make df out of two lists python how to make a list a dataframe create pandas df from list pandas concat lists into dataframe make a data fram from list list to new datafram df from list pandas create dataset from list pd dataframe from lists create dataframe columns from list creating a dataframe in python using list load many list in to data frame conver multiple list in to data frame forming a dataframe using the listed columns lists to dataframe python create dataframe with lists pandas or from list two list into dataframe pandas as ky valu two list into dataframe pandas pandas from list how to create a dataframe from a list create dataframe from list pandas how to create pandas using lists make dataframe two list how to make a list to dataframe list to pandas dataframe append multiple list to dataframe pandas python two list as in pandas dataframe row create a dataframe of list pandas dataframe from list with column names pd.dataframe from list how to make a dataframe out of 3 list how to make dataframe from three lists in python pandas create dataframe from 2 lists create df from two lists join multiple lists into dataframe by column convert list to pandas dataframe pandas two columns is in two lists list to pandas convert list into dataframe how to make dataframe using list dataframe out of two arrays create dataframe from list dataframes pandas create dataframe from list dataframes dataframe from lists pandas how to make dataframe dataa list in python convert multiple lists into a dataframe turn two lists into a dataframe create panda from list merge two list into one dataframe create a dataframe and insert lists pandas make dataframe from list of lists list to pandas df python write list to dataframe py pandas list at list to df pandas how to convert into dataframe in python make dataframe column from list list to data fram in python list to dataframe pandas create list of dataframes pandas pandas create a new dataframe from lists how to convert list to pandas dataframe PYTHON zip lists to dataframe multiple list to dataframe list to df python how to create a list of pandas dataframe pandas to list data frame create a dataframe from a list make dataframe from list create a dataframe with values from lists create a dataframe with values from list create a new dataframe with values from list create dataframe from list pandas create dataframe list of columns pandas cerate dataframe list of columns how to convert list to pandas dataframe in python pandas dataframe from list how to make dataframe column from list list as dataframe pandas python list to pandas dataframe create pandas dataframe from list add two lists to the same dataframe from list to pandas dataframe pandas create dataframe from list convert list to dataframe python make list contain dataframe python how to convert netsedlist to dataframe using pandas create data frame from list list to dataframe python how to create list as column in dataframe using pandas python use list instead of dataframe pandas lists sdataframe from 2 lists python how to make a dataframe from list create dataframe from lists pandas list to dataframe lists to dataframe dataframe from list create multiple lists into a dataframe pandas pandas create dataframe from lists lists to df python pandas list to df with name how to make a fata frame of multiple lists in python create pandas df from several lists make pandas dataframe from lists how to convert list to dataframe in python datag=frame from list python how to make a pandas dataframe from lists how to convert two list to dataframe make a pandas dataframe from several listst pandas join two lists as dataframes make dataframe from 2 lists df from lists pandas create dataframe from three lists dataframe from multiple lists python crete dataframe form two lists python convert two lists to dataframe three lists to pandas how to create a dataframe from two lists column has multiple list pandas how to create a pd.DataFrame from lists putting list into dataframe many list to pandas column creating dataframe from lists combine 2 lists into a dataframe initialize dataframe two lists combine list to datafrmaep python combine list to dataframe python python concatenate two lists to dataframe join two lists in one dataframe python python pandas create dataframe from 2 lists multiple list items to pandas dataframe make dataframe from lits creating a dataframe from multiple lists create pandas dataframe from 2 lists pandas df from 2 lists create dataframe using multiple lists create a dataframe out of multiple lists pandas add multiple list into dataframe python merging list into dataframe jupyter make new dataframe from two lists panas convert multiple lists to dataframe create dataframe from two lists python combine two lists to dataframe Make df from lists multiple datafrmae with a list how to create new dataframe using 2 list in python two list to pandas dataframe how to create dataframe from multiple list in python from two lists to dataframe df = pd.DataFrame(list(zip(*[yourList, yourList2 , yourList3]))).prefix=col how to make two list into dataframe columns create a dataframe from two lists create pd dataframe from lists create dataframe from two lists in python 2 lists to dataframe python create dataframe from 3 columns create dataframe with multiple lists dataframe from 2 lists ' create a dataframe from two arrays make a dataframe from two arrays make dataframe from lists pandas read list pandas column with multiple lists convert two lists into dataframe python python multiple lists to dataframe how to make a data frame from two lists three lists to a dataframe python create dataframe from multiple lists python 2 list to dataframe make dataframe from 2 list pd.dataframe two lists python how to Create Pandas Dataframe from Multiple Lists How to Create Pandas Dataframe from Multiple Lists create a dataframe with a list with multiple vlaues pd.dataframe from two lists python make two column list from two lists multiple lists to dataframe python how to make a dataframe out of several lists in python dataframe from two lists put 2 list in dataframe python from more than 1 list make a single dataframe 2 list to dataframe python python combine list to create dataframe two lists to dataframe python rewrite multiple columns with multiple lists pandas create a pandas dataframe from two lists create a pandas dataframe from 2 lists pandas add multiple lists to dataframe how to put a multiple list object in pandas dataframe? pandas 2 list to dataframe from lists to pandas dataframe create pandas dataframe from two lists pandas multile list to one create dataframe from two lists pandas pandas dataframe from list as columns create dataframe from to lists python convert 2 lists to dataframe python create dataframe from two list python how to combine two list and create a dataframe in python how to combine two lists into a dataframe in python pandas two lists to dataframe create pandas dataframe from lists python lists to dataframe how to create a list in a column python make a dataframe pandas out of two lists how to put list into dataframe in python pandas dataframe two lists two lists to pandas dataframe python make dataframe from two lists how to convert list into dataframe in python how to create a dataframe with lists pandas create a dataframe with 2 lists python create dataframe in python from 2 lisyts zip 2 lists python pandas dataframe how to zip two lists into pandas series list of list create pandas dataframe header multiple list to dataframe python put multiple lists into one column python pandas create dataframe from multiple list pandas dataframe create multiple lists using headers as keys combine two lists in dataframe how to combine two lists into a dataframe two lists in dataframe using 2 columns as lists to form dataframe create a 2 column pandas table to list 2 list in one data frame how to convert a two lists to pandas to list tow dataframe how to use in with lists python python list append two list pandas dataframe from two lists ways to build a pandas dataframe from 2 lists convert two list into dataframe python pandas make dataframe from lists pandas create dataframe with lists pandas create dataframe from multiple lists python two list of columns names how to convert multiple list to a dataframe in python how to create a dataframe from two lists in python
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source