q26.py
· 313 B · Python
Bruto
# Using Pandas, create a dataframe, initialize it with the contents such as your enrollment Number and name and
# display them.
import numpy as np
import pandas as pd
class_list = pd.DataFrame(np.array([
["Name", "Enrollment Number"],
["Alice", 1],
["Bob", 2],
["Bob", 3]
]))
print(class_list)
1 | # Using Pandas, create a dataframe, initialize it with the contents such as your enrollment Number and name and |
2 | # display them. |
3 | |
4 | import numpy as np |
5 | import pandas as pd |
6 | |
7 | class_list = pd.DataFrame(np.array([ |
8 | ["Name", "Enrollment Number"], |
9 | ["Alice", 1], |
10 | ["Bob", 2], |
11 | ["Bob", 3] |
12 | ])) |
13 | |
14 | print(class_list) |
15 |