Paste a code written for Data Cleansing. during data processing, the original file data must be converted to a certain format during processing. & amp; nbsp; original file data: 123.txt,, 5 use Python to convert to a two-dimensional list :#! Usrbinenv & amp; nbsp; python # codingutf-8def & amp; nbsp; loadDataSet (): & amp; nbsp; & amp; n... paste a code written for Data Cleansing. during data processing, the original file data needs to be converted to a certain format during processing. the original file data is 123.txt, 5. convert Python to a two-dimensional list :#! /Usr/bin/env python # coding = utf-8def loadDataSet (): file = open ("123.txt"," r ") List_row = file. readlines () list_source = &
1. a detailed introduction to the two-dimensional list
Introduction: [background] in the business logic, data of a certain field needs to be processed. it is required that the data starting from the right side should be removed from the data starting from the first, and that is 0 consecutive. We get used to using the rtrim function to process spaces at the beginning of the right side, but ignore that this function can actually remove specific numbers.
[Related Q & A recommendations ]:
Python-Scrapy ItemLoader
Data cleansing for two tables in node. js-MYSQL
The above is a detailed description of 10 articles recommended for data cleansing courses. For more information, see other related articles in the first PHP community!