Q. Write a program to print a DataFrame one column at a time and print only first three columns.


Answer =




import pandas as pd
import numpy as z
dict = { 'name' : [1, 2, 3] }
df = pd.DataFrame(dict)
for i , j in df.iteritems() :
    print( j )



1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post