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 ▸

Create a program that takes in two numbers and returns the highest of the two


How would you loop over every key and value in a python dictionary?


Write a recursive function to return the nth Fibonacci number in Python


Whats the output of "for i in "hello world": print(i)" and why/how is this achieved