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 ▸

Sort a given input of lowercase letters alphabetically


Explain the difference between local and global variables


What is the difference between a FOR loop and WHILE loop and how do I write them?


What is the difference between a for loop and a while loop?