Answers for "df to list in python"

8

pandas to list

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

list of df to df

import pandas as pd
df = pd.concat(list_of_dataframes)
Posted by: Guest on May-06-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

Python Answers by Framework

Browse Popular Code Answers by Language