Articles → Pandas → Dataframe In Pandas

Dataframe In Pandas

What Is Dataframe?

Picture showing the pictorical representation of the dataframe
Click to Enlarge


import numpy as np
import pandas as pd

print(pd.DataFrame(np.random.randn(5,4),['A', 'B', 'C', 'D', 'E'],['W', 'X', 'Y', 'Z']))

Picture showing the output of the dataframe in pandas
Click to Enlarge

Access Elements In Dataframe

import numpy as np
import pandas as pd

df = pd.DataFrame(np.random.randn(5,4),['A', 'B', 'C', 'D', 'E'],['W', 'X', 'Y', 'Z'])


# You can also use df.W

Picture showing how the data is accessed column-wise in dataframe
Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Thursday, April 11, 2019


Your Email Id  
Query/FeedbackCharacters remaining 250