0

I have a question I have a list

list=['nick', 'george', 'kate'] 

Is it possible to convert it into a dataframe with headers the names of the list ? ('nick' etc.) probably it's easy but I am a beginner so I struggle a little bit thanks!

1 Answer 1

2

Code

import pandas as pd list = ['nick', 'george', 'kate'] df = pd.DataFrame(list, columns =['name']) print(df) 

Output

 name 0 nick 1 george 2 kate 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.