1 record machine operation on machine learning related knowledge && review

import pandas as pd

df = pd.read_csv ( 'woman.csv') is read out of the format DataFrame

pd.shape return value is the number of rows and columns (rows, columns), pd.shape [0] returns rows, pd.shape [1] is returned to the column

"height","weight"

1,2

155,232

The number of rows is not the name of the header

Number is starting from 0

Direct print (df [ 'weight']) are single quotes double quotes

df.head () before directly output five elements (0-4), if the need to specify particular the first few lines, which can be added in the head num

df.describle () will output the number count, the average mean, standard deviation std, the minimum value min, represent a few percent in the overall ranking numbers are the percentage of how much of what value max

df.isnull () will come out a bool matrix to see each one is not empty, not empty is False, True is empty

The number of null values ​​of the respective columns df.isnull (). Sum () Statistics

df.isnull (). any () determines whether each column nulls

 

Guess you like

Origin www.cnblogs.com/tingxilin/p/11595291.html