With the help of Pandas and Numpy library create a DataFrame with the columns "Name", "Surname", "Age" and "Gender", create as many rows as you want. Print out the result.

import pandas as pdimport numpy as npdf = pd.DataFrame(np.array([["John", "Smith", 23, "Male"], ["Emily", "Adams", 19, "Female"]]), columns=['Name', 'Surname', 'Age', 'Gender'])print(df)

LR

Related Python Mentoring answers

All answers ▸

What is the difference between using range() and a list of values?


Describe both For-loops and While-loops and explain how you can simulate the effect of a for loop with a while loop with an example.


Write a function that takes a list of numbers as input, and outputs the average of the numbers. The function should catch any errors.


What are the main data structures that I can use in Python