Import and export of pandas data under Ipython Notebook tool


The file to be read is in .csv format and is read through the file path.

Automatic index allocation

Insert picture description here

Manually assign index

Insert picture description here
Insert picture description here

Set multi-level row index

Insert picture description here

Handling irregular delimiters

Insert picture description here
Insert picture description here

Dealing with missing values

Specify missing values to specify missing values
Insert picture description here
for different columns
Insert picture description here

Modular processing of big data

Sub-module count (read one thousand lines each time), the for loop realizes the
Insert picture description here
extraction of the top ten
Insert picture description here

Save data to disk

Insert picture description here
Specify several columns of data to be written, and specify the separator
Insert picture description here
to read and save
binary data. Advantages: small capacity, fast reading speed, disadvantages: incompatibility between different versions, such as the binary data saved in earlier versions after Pandas version upgrades It may not be removed normally.

Guess you like

Origin blog.csdn.net/weixin_42567027/article/details/107302214