0% found this document useful (0 votes)
20 views89 pages

anuj

The document is a lab record for a Data Science course at B.V. Raju Institute of Technology, detailing various programming exercises and tasks for students. It includes sections for creating lists, dictionaries, and data frames, as well as data manipulation using pandas and visualizations with plots. The document serves as a guide for students to complete their lab assignments throughout the academic year.

Uploaded by

Anuj Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views89 pages

anuj

The document is a lab record for a Data Science course at B.V. Raju Institute of Technology, detailing various programming exercises and tasks for students. It includes sections for creating lists, dictionaries, and data frames, as well as data manipulation using pandas and visualizations with plots. The document serves as a guide for students to complete their lab assignments throughout the academic year.

Uploaded by

Anuj Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 89

B.V.

Raju Institute of Technology


(UGC-Autonomous)
Vishnupur, Narsapur, Medak Dist – 502313

Department of Computer Science Engineering

DATA SCIENCE
LAB RECORD

B.TECH
III YEAR/I SEM Reg NO:___________________
NAME:____________________
B V RAJU INSTITUTE OF TECHNOLOGY
( UGC - Autonomous )
Vishnupur, Narsapur, Medak Dist – 502313

UNIVERSAL LEARNING

CERTIFICATE
This is to certify that this is the bonafide work of

Reg.No.

of B.Tech year semester, Branch in

the laboratory

during the academic year _.

Staff In-Charge Head of Department

Submitted for the University examination held


on .

Internal Examiner External Examiner

B V RAJU INSTITUTE OF TECHNOLOGY, NARSAPUR, MEDAK.


INDEX

S.No Date Name of the program Page.No Signature


S.No Name of the program Page.No Signature
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Week-1
Lists, Tuples and Dictionaries

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
Computer Networks and Operating Systems PAGE NO: __
Data Science Lab
DATE: _ _ /_ _ /_ _

1. Create a list containing the numbers from 1 to 10. Remove the number
5, reverse the list, and then sort it.

Output:

2. Create a list of all even numbers between 1 and 20 using list


comprehension.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
Data Science
Computer Lab and Operating Systems
Networks PAGE NO: __
DATE: _ _ /_ _ /_ _

3. Given the tuple `my_tuple = (10, 20, 30)`, unpack the elements into
variables `a`, `b`, and `c` and print them.

Output:

4. Create a dictionary where the keys are numbers from 1 to 5 and the
values are their cubes.

Output:

5. Create a nested list `nested_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]`. Extract
and print the element at the second row and third column.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science Lab
DATE: _ _ /_ _ /_ _

6. Given the dictionary `dict_of_lists = {‘group1’: [1, 2, 3], ‘group2’: [4, 5,


6]}`, merge the lists into a single list and print it.

Output:

7. Given the dictionary `sample_dict = {‘a’: 1,’b’: 2,’c’: 3}, use the `get()`
method to print the value for key ‘d’ with a default message ‘Not Found’.

Output:

8. Create a named tuple `Car` with fields `make`, `model`, and `year`. Create
an instance of `Car` and print its fields.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Week-2

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science Lab DATE: _ _ /_ _ /_ _


Data

1. Read the CSV file students.csv into a pandas DataFrame, filter students
with score greater than 80, and save the filtered data to a new CSV file
filtered_students.csv.

Output:

2. Read the text file input.txt, count the number of lines, and write the
count to a new text file line_count.txt.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

3. Read the JSON file products.json, add a new product to the list, and
save the update list back to the JSON file.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

4. Read an image image.jpg, convert it to grayscale, and save the grayscale


image as grayscale_image.jpg.

Output:

5. Read a JSON file from a web URL into a pandas DataFrame and display
the first five rows.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Week-3

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

1. Create a DataFrame with sample data, save it in CSV, TXT, and JSON
formats, then read it back and describe the procedure.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

2. Plot histograms for the Age and Salary columns from the sample
DataFrame and describe the distribution.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

3. Analyze the differences in histograms between the Age and Salary


columns and describe the findings.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Week-3

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

4. Create a DataFrame with columns of different data types (e.g., integers,


floats, strings,dates), save it in CSV, JSON, and Excel formats, and
describe the procedure.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

5. Plot histograms for the Price and Stock columns from the sample
DataFrame and describe the distribution.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

6. Analyze the differences in histograms between the Price and Stock


columns and describe the findings.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

7. Create a DataFrame with an additional column Discount, save it in CSV,


JSON, and Excel formats, and describe the procedure.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

8. Plot a histogram for the Discount column from the sample DataFrame
and describe the distribution.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

9. Analyze the differences in histograms between the Price, Stock, and


Discount columns and describe the findings.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

Week-4

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

1. Using the sample data provided, create a bar plot with error bars, add
text labels above each bar, and customize the appearance of the plot.
Sample Data:
• Categories: [X, Y, Z, W]
• Values: [20, 35, 30, 25]
• Errors: [2, 3, 2.5, 1.5]

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

2. Modify the bar plot to display horizontal bars with error bars, add text
labels at the end of each bar, and customize the appearance of the plot.
Sample Data:
• Categories: [P, Q, R, S]
• Values: [40, 25, 50, 30]
• Errors: [4, 2.5, 5, 3]

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

3. Create a stacked bar plot with error bars for two sets of values, add text
labels above each bar, and customize the appearance of the plot.
Sample Data:
• Categories: [A1, B1, C1, D1]
• Values1: [10, 20, 15, 25]
• Errors1: [1, 2, 1.5, 2]
• Values2: [5, 15, 10, 20]
• Errors2: [0.5, 1.5, 1, 1.5]

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

4. Create a line plot with multiple lines representing different mathematical


functions (e.g.,sine, cosine, and tangent), add error bars and annotate the
maximum and minimum points.
Sample Data:
• x: np.linspace(0, 10, 100)
• y1: np.sin(x)
• y2: np.cos(x)
• y3: np.tan(x)
• yerr: 0.1 + 0.1 * np.sqrt(x)

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

5. Create a scatter plot where points are colored based on a categorical


variable, add error bars and a legend to differentiate the categories, and
add annotations.
Sample Data:
• Categories: [A, B, C]
• x and y: Randomly generated data points
• yerr: Randomly generated error values
• Colors: [A: Red, B: Blue, C: Green]

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

6. Create a pie chart with a custom start angle, customize the appearance
with different colors and explode values, and add annotations.
Sample Data:
• Labels: [Group A, Group B, Group C, Group D]
• Sizes: [30, 25, 25, 20]
• Colors: [gold, yellowgreen, lightcoral, lightskyblue]
• Explode: (0, 0.1, 0, 0.1)

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

7. Create a box plot for multiple categories, highlight the outliers with a
different color, and add annotations for the median values.
Sample Data:
• Categories: [Cat1, Cat2, Cat3]
• Data: Randomly generated normal data with different standard
deviations

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Week-5

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

1. Calculate the mean, median, mode, standard deviation, and variance for
a dataset of 100 randomly generated integers between 1 and 100.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

2. Generate a summary statistics table and histograms for a dataset


containing 100 students scores in Math, Science, and English.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

Output:

3. Calculate the correlation coefficient between students' scores in


Math and English, and plot a scatter plot with a regression line.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science Lab and Operating Systems DATE: _ _ /_ _ /_ _


Computer Networks

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

4. Perform a t-test to compare the mean scores of two groups of students in


Science and create a bar plot with error bars for the mean scores of both
groups.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

5. Calculate the skewness and kurtosis of a dataset with 1000 random


integers between 1 and 100, and interpret the results.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

6. Generate a pair plot for a dataset with variables representing height,


weight, and age, and interpret the relationships between these variables.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

7. Calculate 95% confidence intervals for the mean height of students and
visualize them with a bar plot.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

8. Perform a chi-square test on a contingency table representing survey


responses about two different products.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

9. Upload a CSV file containing student scores, calculate summary statistics


for each subject, and plot histograms for each subject.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

10. Upload a text file, preprocess the text, and create a bar plot of the top 10
most common words.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science Lab and Operating Systems DATE: _ _ /_ _ /_ _


Computer Networks

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

11. Upload an image file, convert it to grayscale, and calculate the mean,
median, and mode of pixel intensities. Also, plot the histogram of pixel
intensities.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
DATE: _ _ /_ _ /_ _
Data Science
Computer Lab and Operating Systems
Networks

12. Upload a JSON file containing employee information, convert it to a


dataframe, calculate summary statistics for numerical columns, and
visualize the distribution of ages.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science Lab and Operating Systems DATE: _ _ /_ _ /_ _


Computer Networks

Week 6

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science Lab and Operating Systems DATE: _ _ /_ _ /_ _


Computer Networks

1. Develop a dashboard to visualize stock market data, including closing


prices, moving averages, daily returns, and Bollinger Bands for a selected
stock symbol.

B V RAJU INSTITUTE OF TECHNOLOGYDepartment


, NARSAPUR, of
MEDAK .
Computer Science and
v B.V. Raju Institute of Technology
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

2. Fetch historical data for multiple stock symbols, calculate the correlation
matrix, and visualize it using a heatmap.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

3. Create a portfolio of stocks, calculate its cumulative returns, and visualize


the performance.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

4. Compare the performance of two stocks over time by plotting their


adjusted closing prices and calculating their cumulative returns.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

5. Visualize the trends of stock prices along with moving averages over a
specified period.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

6. Analyze and visualize the volatility of a stock using its rolling standard
deviation over a specified period.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __
Data Science
Computer Lab and Operating Systems
Networks DATE: _ _ /_ _ /_ _

Output:

7. Create an interactive line plot for stock prices with Plotly to allow
zooming and hovering features.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO: __

Data Science Lab and Operating Systems DATE: _ _ /_ _ /_ _


Computer Networks

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 7

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Output:

Activity Program 1: Visualize Petal Length Outliers


Task: Create a scatter plot showing petal lengths and highlight the
outliers.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Output:

Activity Program 2: Compare Petal Length Statistics by Species


Task: Compare average petal lengths and standard deviations across
different Iris species.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Activity Program 3: Visualize Petal Length Distribution with Box Plots


Task: Create box plots of petal lengths for each Iris species to visualize the
distribution and outliers.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Activity Program 4: Identify and Visualize Outliers Using


Interquartile Range (IQR)
Task: Identify and visualize petal length outliers using the Interquartile
Range (IQR) method.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Activity Program 5: Compare Petal Length and Width by Species Using


Pair Plots
Task: Use pair plots to compare petal length and width among different
Iris species.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Networks Week 7
Laband Operating DATE: _ _ /_ _ /_ _
Systems

Week 8

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Networks
Week 7
Laband Operating DATE: _ _ /_ _ /_ _
Systems

Q) Write a function that applies different methods (mean, median, and


mode) to replace missing values in a DataFrame. Compare the results
and visualize the differences.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
Output:
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 9

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Networks
Week 7
Laband Operating DATE: _ _ /_ _ /_ _
Systems

Q) Create a Python function that takes a DataFrame and generates a


stacked bar plot to visualize the composition of categories within each
group.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 10

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Q) Implement a Python function to create a dendrogram for a dataset and


visualize it. Allow users to specify the method for clustering.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 11

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Q) Create a Python function that performs object detection on a video


stream from your webcam using OpenCV. Display the detected objects in
real-time.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 12

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Q) Write a Python function to perform sentiment analysis on tweets fetched


using the Tweepy library. Use a sentiment analysis library to categorize
tweets as positive negative, or neutral.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 13

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Q) Develop a collaborative filtering recommendation system using the KNN


Algorithm. Implement a function that takes user-item ratings and
returns item recommendations for a specific user.

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Week 14

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Q) Create a Python function that performs topic modeling on a given set of


Documents using LDA (Latent Dirichlet Allocation). Return the top
keywords for each topic.

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering
PAGE NO:
Data Science
Computer Laband Operating
Networks DATE: _ _ /_ _ /_ _
Systems

Output:

B.V. Raju InstituteBof


V Technology
RAJU INSTITUTE OF TECHNOLOGYDepartment
, NARSAPUR, of
MEDAK .
Computer Science and
Engineering

You might also like