Introduction To Python (Part III)
Introduction To Python (Part III)
(PART III)
arr1 = np.empty((2,3))
[[ 5, 2, 56],
[ 0, 132, 1056]]
[[ 37, 2, 5609]]
BASIC PYTHON LIBRARIES – NUMPY (CONTD.)
arr_concat = np.concatenate((arr1, arr2), axis = 0)
print(arr_concat)
[[ 5 2 56]
[ 0 132 1056]
[ 37 2 5609]]
pandas.core.frame.DataFrame
(398, 9)
data.get_value(200,'cylinders')
data_cyl.head()
0 chevrolet chevelle malibu
1 buick skylark 320
2 plymouth satellite
3 amc rebel sst
4 ford torino
Name: car name, dtype: object
BASIC PYTHON LIBRARIES – PANDAS (CONTD.)
Find missing values in a data set:
import numpy as np
import pandas as pd
Then the portion of the data set not having any missing row is kept apart.
Then join back the imputed rows and the remaining part of the data set.