0% found this document useful (0 votes)
5 views6 pages

Python Pandas - Data Frame Notes

The document provides an overview of DataFrames in pandas, describing them as two-dimensional objects that represent data in rows and columns, similar to spreadsheets or SQL tables. It outlines the structure of DataFrames, including their axes, mutability, and methods for creation from various data types. Additionally, it discusses operations that can be performed on DataFrames, such as modifying, adding, deleting, and renaming rows and columns.

Uploaded by

Daniel Mathew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Python Pandas - Data Frame Notes

The document provides an overview of DataFrames in pandas, describing them as two-dimensional objects that represent data in rows and columns, similar to spreadsheets or SQL tables. It outlines the structure of DataFrames, including their axes, mutability, and methods for creation from various data types. Additionally, it discusses operations that can be performed on DataFrames, such as modifying, adding, deleting, and renaming rows and columns.

Uploaded by

Daniel Mathew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Data Frames

Creation dictionary of Series, - from list of dictionaries, Text/CSV files;


display; iteration;
Data Frame: It is a two-dimensional object that is useful in representing data in the form of rows and
columns. It is similar to a spreadsheet or an SQL table. This is the most commonly used pandas
object. Once we store the data into the Dataframe, we can perform various operations that are useful
in analyzing and understanding the data.
DATA FRAME STRUCTURE

• A Dataframe has axes (indices)-

Row index (axis=0)


Column index (axes=1)
• It is similar to a spreadsheet, whose row index is called index and column index is called
column name.

A Dataframe contains Heterogeneous data.


A Dataframe Size is Mutable.
A Dataframe Data is Mutable.
• A data frame can be created using any of the following

 Series
 Lists
 Dictionary
 A numpy 2D array
Operations on rows and columns
add, select, delete, rename,Head and Tail functions; Indexing using Labels,
Boolean Indexing;
MAIN POINTS
Modify the Data Frame- We can modify the existing data frame by Adding new row/columns,
change the existing value of Row & Columns, rename the column/row and delete the row/columns.
1. Adding new column in existing DataFrame - Suppose a Existing DataFrame DF is like as

DF
For modify multiple row values, we can do it as-
DF.loc[2:4,:]=200 or DF.at[2:4,:]=200,then Frame will be –like

You might also like