EDA_UNIT_1
EDA_UNIT_1
UNIT-I
Theory:
1.a) Open any browser and paste the above Kaggle link. A zip file will be
downloaded. Unzip it and study the Cars4U dataset(
used_cars_data.csv(785.45 kB))
in detail.
Explain the columns of the Dataset and count the no.of rows .
>python get-pip.py
Conclusions:
Theory:
import numpy as np
For creating different types of numpy arrays, we will use the following code:
# importing numpy
import numpy as np
# Defining 1D array
my1DArray = np.array([1, 8, 27, 64])
print(my1DArray)
For displaying basic information, such as the data type, shape, size, and strides of
a NumPy array, we will use the following code:
For creating an array using built-in NumPy functions, we will use the following
code:
# Array of ones
ones = np.ones((3,4))
print(ones)
# Array of zeros
zeros = np.zeros((2,3,4),dtype=np.int16)
print(zeros)
# Empty array
emptyArray = np.empty((3,2))
print(emptyArray)
# Full array
fullArray = np.full((2,2),7)
print(fullArray)
# Array of evenly-spaced values
evenSpacedArray = np.arange(10,25,5)
print(evenSpacedArray)
CONCLUSIONS:
3.. Loading Dataset into pandas dataframe
CONCLUSION:
The following code displays the rows, columns, data types, and memory used by the
dataframe:
df.info()
Let's now see how we can select rows and columns in any dataframe:
# Selects a row
df.iloc[10]
# Selects 10 rows
df.iloc[0:10]
# Selects a range of rows
df.iloc[10:15]
CONCLUSIONS: