how many times do you want to input: 2 Input Name: First Input Age: 12 Input Name: Second Input Age: 32 ['First', 12, 'Second', 32]' #this part is my problem, im stuck here on putting a column level 0 0 ha 1 12 2 la 3 32 pls help me to make this like this one Name Age 0 First 12 1 Second 32
lst=[] n=int(input("how many times do you want to input: ")) for i in range (0, n): eles = str(input("Input Name: ")) els = int(input("Input Age: ")) lst.append(eles) lst.append(els) print(lst) import pandas as pd df = pd.DataFrame(lst) print(df)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)