Articles → Pandas → Dataframe In Pandas
Dataframe In Pandas
What Is Dataframe?
Click to Enlarge
Example
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']))
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'])
print(df['W'])
# You can also use df.W
Click to Enlarge