3rd EXPERIMENT
3rd EXPERIMENT
Experiment
Student Name: Dev Pundir UID:23BCS10576
Branch:Computer Science & Engineering Section/Group:202-A
Date of Performance:Sept26,2023 Semester: 1st
Subject Name: Disruptive Technology-1 Subject Code: 23ECH-102
2. Tool Used:
Google colaboratory
3.Theory:
Data Analytics: The process of examining datasets to draw conclusions about the
information they contain. Data analytic techniques enable you to take raw data and
uncover patterns to extract valuable insights from it. Many data analytics techniques use
specialized systems and software that integrate machine learning algorithms, automation
and other capabilities.
Pandas: Pandas is one of the most widely used python libraries in data science. It
provides high-performance, easy to use structures and data analysis tools. Unlike NumPy
library which provides objects for multi-dimensional arrays, Pandas provides in-memory
2d table object called Dataframe. It is like a spreadsheet with column names and row
labels.
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
import numpy as n
c=[12,331,30,40,50,60,70,80,90,12331]
d=n.array(c)
print(c)
print(d)
print(type(c))
print(type(d))
OUTPUT
2. APPENDING
import numpy as n
c=[10,20,30,40,50,60,70,80,90,100]
c.append(12331)
print(c)
c[4]=10544
print(c)
OUTPUT
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
import numpy as n
c=n.ones((4,5,3))
d=n.zeros((5,4,3))
print(c)
print(d)
OUTPUT
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
import numpy as n
c=n.arange(10)
print(c,type(c))
d=n.arange(10).reshape(10,1)
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
print(d, type(d))
e=n.arange(10).reshape(5,2)
print(e, type(e))
OUTPUT
5. LINESPACING
import numpy as n
c=n.linspace(4,30,30)
print(c)
d=n.linspace(4,8,5)
print(d)
OUTPUT
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
6.RANDOM INTEGER
import numpy as n
a=n.random.randint(10,91, (4,3))
print(a,"\n", a.shape,a.dtype)
print("*"*30)
b=n.random.random_sample(size=(5,3))
print(b,"\n", b.shape,b.dtype)
print("*"*30)
c=n.random.randint(10,15,size=(3,2))
print(c,"\n", c.shape,c.dtype)
print("*"*30)
OUTPUT
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
import pandas as pd
dates
OUTPUT
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
import pandas as pd
df = pd.read_csv('/content/data14.csv')
print(type(df))
df.head()
df.tail()
OUTPUT-
import pandas as pd
df = pd.read_csv('/content/data14.csv')
df.index
df.describe()
df.info()
OUTPUT--
import pandas as pd
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
df = pd.read_csv('/content/data14.csv')
df.corr()
df.isnull()
OUTPUT—
import pandas as pd
df = pd.read_csv('/content/data14.csv')
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
df.iloc[20:30, 1:5]
df.loc[:10 , ['F1','F3','F6']]
OUTPUT—
12.Transpose
import pandas as pd
df = pd.read_csv('/content/data14.csv')
c=df.T
print(c)
OUTPUT--
13.Dimension of dataset
import pandas as pd
df = pd.read_csv('/content/data14.csv')
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
df.head()
OUTPUT—
5. Learning outcomes:
1.Array-We learnt how to form array using numpy .We also learnt the difference
between list and arrays.
3.Zeros and ones- We learnt to create arrays using only zeros and ones.
5.Line spacing- We learnt that linespacing Return evenly spaced numbers over a
specified interval.
23BCS10576
University Institute of Engineering
Department of Computer Science & Engineering
8.Reading cvs file- We learnt that tail command read last 5 rows of dataset and head
command does the same for first 5 dataset rows .
9.Indexing summary and info- We learnt that index prints the total indexing,
summary prints the mathematical summary and info prints the details about that
array using pandas.
10.Correlation and isnull- We learnt that correlation finds the correlation ad isnull
prints a bool that the input is null or not using pandas.
Evaluation Grid:
Sr. Parameters Marks Obtained Maximum Marks
No.
1. Student Performance 12
(Conduct of experiment)
2. Viva Voce 10
3. Submission of Work Sheet 8
(Record)
Signature of Faculty (with Date): Total Marks Obtained: 30
23BCS10576