Answers for "CREATE a dataframe from list"

1

create a dataframe from lisdt of list

import pandas as pd 
# initialize list of lists
data = [['Geeks', 10], ['for', 15], ['geeks', 20]]
# Create the pandas DataFrame
df = pd.DataFrame(data, columns = ['Name', 'Age'])
Posted by: Guest on July-19-2021
0

list from dataframe python

col_one_list = df['one'].tolist()

col_one_arr = df['one'].to_numpy()
Posted by: Guest on July-12-2021

Code answers related to "CREATE a dataframe from list"

Python Answers by Framework

Browse Popular Code Answers by Language