Articles → Pandas → DataFrame in pandas

DataFrame in pandas






What is DataFrame?





Click to Enlarge


Example




import numpy as np
import pandas as pd

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





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'])

df['W']

# You can also use df.W





Click to Enlarge




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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250