Implementation of pandas for Excel processing

Time:2021-9-26

This paper mainly introduces the implementation of pandas for Excel processing, which is shared with you as follows:

Implementation of pandas for Excel processing

Implementation of pandas for Excel processing

read file

import padas

Numerical processing

DF ["dog"] = DF ["dog"]. Replace (- 1,0) # value replacement

get data

Data = DF. Head() # default read line

Detailed explanation of LOC and iloc

LOC [row, column] first and then column: all rows or columns. Generally, multiple rows can use brackets, and continuous rows can use a: C, etc

Multiline

Multiline nesting

Output row and column numbers

Output line number and print out

Gets the specified value

Gets the value of the specified column

Basic formatting

Remove all rows with null values

Data multi table consolidation

Data merging

Implementation of pandas for Excel processing

Add a new DF4 table, connect it horizontally to column 2367 of DF1 table, and fill the vacancy with Nan

Implementation of pandas for Excel processing

Intersect and merge DF1 and DF4 horizontally

Implementation of pandas for Excel processing

Implementation of pandas for Excel processing

Implementation of pandas for Excel processing

Implementation of pandas for Excel processing

#Solve the problem of incomplete display

This is the end of this article about the implementation of pandas for Excel processing. For more information about pandas excel processing, please search the previous articles of developeppaper or continue to browse the relevant articles below. I hope you will support developeppaper in the future!