0% found this document useful (0 votes)
3 views3 pages

IA1

The document consists of a series of questions related to using IPython, NumPy, and Pandas for data manipulation and performance assessment. It covers topics such as magic commands for performance measurement, array slicing techniques, structured arrays, DataFrame creation, and handling missing data. The questions are designed to test knowledge and practical skills in these Python libraries.

Uploaded by

parvithac31
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)
3 views3 pages

IA1

The document consists of a series of questions related to using IPython, NumPy, and Pandas for data manipulation and performance assessment. It covers topics such as magic commands for performance measurement, array slicing techniques, structured arrays, DataFrame creation, and handling missing data. The questions are designed to test knowledge and practical skills in these Python libraries.

Uploaded by

parvithac31
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/ 3

1.

​ How would you use the %run magic command in IPython to assess the performance of
an external Python script?​

2.​ How would you use the %timeit magic command in IPython to compare the execution
time of different code implementations?​

3.​ How would you compare the execution time of a list comprehension and a for-loop using
%timeit in IPython?​

4.​ Demonstrate how to use IPython’s In and Out objects to retrieve and manipulate past
inputs and outputs in an interactive session.​

5.​ How can the use of underscores in IPython help you efficiently retrieve the previous
output and use it in computations?​

6.​ How does the %history magic command assist in reviewing and re-executing past
inputs and outputs in IPython?​

7.​ Analyze how IPython allows interaction with shell commands like ls, pwd, and echo.
How would you explain the functionality of these shell commands in IPython and their
role in facilitating Python-shell communication? ​

8.​ How would you streamline the process of performing repeated computations without
re-executing previous code using IPython’s shortcut features?​

9.​ Demonstrate how to use array slicing in NumPy to access subarrays from a
one-dimensional array.​

10.​How can you apply array slicing techniques in NumPy to extract specific rows from a
multi-dimensional array?​

11.​Explain how to use array slicing in NumPy to reverse the order of elements in a given
array.​

12.​How does the concept of views versus copies in NumPy impact the modification of
subarrays?​

13.​Demonstrate how to use NumPy functions for array concatenation with one-dimensional
arrays.​
14.​Provide an example of how to use NumPy functions to concatenate multi-dimensional
arrays.​

15.​Explain how to use the reshape method in NumPy to convert a one-dimensional array
into a two-dimensional row vector.​

16.​Demonstrate how to use np.newaxis to convert a one-dimensional array into a


two-dimensional column vector.​

17.​Analyze how to compute the k-nearest neighbors for a set of points on a 2D plane using
NumPy's argsort and argpartition functions.​

18.​How do NumPy’s argsort and argpartition functions help in efficiently finding the
nearest neighbors in a 2D dataset?​

19.​Illustrate how to create a structured array in NumPy and populate it with different types
of data such as name, age, and weight.​

20.​Demonstrate how to access specific fields in a structured array and extract individual
elements from it in NumPy.​

21.​Apply the concept of advanced compound types and record arrays in NumPy. Discuss
the performance differences and when to prefer record arrays over structured arrays​


Module 2 : ​

22.​How can you create a Pandas DataFrame using a dictionary? Provide an example.​

23.​What is the method to create a DataFrame from a list of lists? Can you show an
example?​

24.​What is a Pandas Index object? Why is it useful in data manipulation?​

25.​How can you perform set operations like union and intersection using a Pandas Index
object?​

26.​How do you create a Pandas Series from a list or array of numbers? Provide an
example.​

27.​How can you create a Pandas Series with custom indices? How would you access
elements using both index-based and label-based methods?​
28.​How do you create a Pandas DataFrame from multiple Series objects? What happens if
the Series have different lengths or indices?​

29.​In what ways can you think of a Pandas DataFrame as similar to both a NumPy array
and a dictionary?​

30.​How does Pandas handle missing data using NaN and None? Can you show how
arithmetic operations work with these values?​

31.​How can you detect, drop, or fill missing values in a Pandas DataFrame? Explain the
different ways of handling missing data.

NOTE : ​

QUESTIONS CAN GET CLUBBED AND BE GIVEN IN TEST AND GIVEN AS 1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy