Answers for "pandas create dataframe fom list of lists"

0

pandas create dataframe from list of lists

# Import pandas library
import pandas as pd
  
# initialize list of lists
data = [['tom', 10], ['nick', 15], ['juli', 14]]
  
# Create the pandas DataFrame
df = pd.DataFrame(data, columns = ['Name', 'Age'])
  
# print dataframe.
df
Posted by: Guest on April-27-2021

Code answers related to "pandas create dataframe fom list of lists"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language