Answers for "Converting Dataframe from the multi-dimensional list with column name"

0

Converting Dataframe from the multi-dimensional list with column name

# import pandas as pd 

import pandas as pd 
# List1 
list = [['apple', 'red', 44], ['grape', 'green', 33], ['orange', 'orange', 22], ['mango', 'yellow', 11]] 
df = pd.DataFrame(list, columns =['Fruits', 'Color', 'Value'], dtype = float) 
print(df)
Posted by: Guest on April-10-2022

Code answers related to "Converting Dataframe from the multi-dimensional list with column name"

Python Answers by Framework

Browse Popular Code Answers by Language