DataFrame Concept, Usage
Dataframe is a 2D-dimensional data structure, size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). a. Two Dimensional - data is stored in the form of rows and columns. Something like below which consists of 3 rows and 2 columns. Output: Name Age 1 Sunny 32 2 Rocky 22 3 Tim 41 Python Code: import pandas as pd df = pd.DataFrame({'Name':['sunny','rocky','tim'],'Age':[32,22,41]},index=[1,2,3]) print(df) Code Explanation: First Line : pandas is a python library which has several built in functions to use for data analysis. DataFrame, Series, Panel are few data structures available inside pandas. For more info refer https://pandas.pydata.org/ . Second Line: DataFrame is a class in pandas used to store 2D(two dimensional) data. Syntax for using DataFrame goes something like below. Third Line: Prints the output in console to see. class pandas.DataFrame(data,index,columns,...