Answers for "from dataframe to list python"

8

pandas to list

df.values.tolist()
Posted by: Guest on April-18-2020
0

list to dataframe

# import pandas as pd
import pandas as pd 
    
# List1 
lst = [['tom', 25], ['krish', 30],
       ['nick', 26], ['juli', 22]]
    
df = pd.DataFrame(lst, columns =['Name', 'Age'])
df
Posted by: Guest on September-23-2021

Code answers related to "from dataframe to list python"

Python Answers by Framework

Browse Popular Code Answers by Language