Answers for "dataframe to list pandas"

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 "dataframe to list pandas"

Python Answers by Framework

Browse Popular Code Answers by Language