Resolved: Pandas dataframe creation
There was one question asked in one exam - what are the ways to create a pandas dataframe and I answered - with pandas series of dictionaries. but it shows correct answer as list of lists.
wwe can create it using list of lists but we can also do it from series of dictionaries as well.
the key will be the column names and values will be the data for each column.
wwe can create it using list of lists but we can also do it from series of dictionaries as well.
the key will be the column names and values will be the data for each column.
3 answers ( 2 marked as helpful)
Hi Abhishek!
Thanks for reaching out.
I suppose you are referring to Question 1 from Practice Test #3 (and please correct me on this point if necessary). Only one of the answers regards a direct way of creating a pandas DataFrame (i.e. without converting a certain Python object into a list, for instance). Nevertheless, we've changed the wording of the question. So, thank you very much for your feedback.
Hope this helps.
Kind regards,
Martin
Understood, thanks Martin.
Thanks to you, too!
Good luck and please don't hesitate to post another question should you need further assistance.
Kind regards,
Martin