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 outcome of the following code? print(2*[3,4,5])


What is Object-Oriented Programming?


Write a short program to print all the even numbers 1 to 100


Explain why creating a list of several instances of one element using something like my_list = [a] * 5 can result in strange behaviour