Here are Python data analyst interview questions asked in Hexaware. That covers oral and programmatic questions. They covered the topics on core Python, NumPy, and Pandas.
Table of Contents
What is Data Analysis
- Data analysis is a process that examines data to find useful information, draw conclusions, and make decisions. It uses techniques and tools like Python with NumPy and Pandas to manipulate, explore, and visualize data.
- The goal of data analysis is to extract insights and make informed decisions. Also, it is helpful in various fields like business, finance, healthcare, marketing, and research. Organizations can understand their operations, customer behavior, market trends, and more with data analysis.
- In conclusion, data analysis is crucial for turning raw data into valuable knowledge and helping businesses and individuals make better data-driven decisions.

Data Analyst Interview Questions
1. What are the differences between a list and a tuple?
The list is mutable. You can modify the data. Whereas the Tuple is immutable. You cannot modify the data.
2. How does memory management happen in Python?
Python has an in-built private heap space. That usually manages the space. At periodical intervals, it clears all the unused objects.
3. What is the real purpose of the NumPy package?
The lists you can write into multi-dimensional arrays. NumPy can be used to perform a wide variety of mathematical operations on arrays.
4. How to create a NumPy array with zeros?
import numpy as np
a=np.zeros(2, dtype=int)
print(a)
Output
[0 0]
** Process exited - Return Code: 0 **
Press Enter to exit terminal
5. What is the real purpose of Pandas?
Pandas is a Python library used for working with data sets. It has functions for analyzing, cleaning, exploring, and manipulating data.
6. How to create a DataFrame from List?
import pandas as pd
my_list=[10, 20, 30, 40, 50]
a=pd.DataFrame(my_list)
print(a)
Output
0
0 10
1 20
2 30
3 40
4 50
** Process exited - Return Code: 0 **
Press Enter to exit terminal
7. What are the possible methods to get the Maximum values of a List?
There are multiple ways to find the maximum value in a list. Here are a few common methods:
- Using the built-in
max()function:numbers = [1, 2, 3, 4, 5] maximum = max(numbers) - Using a loop to compare each element:
numbers = [1, 2, 3, 4, 5] maximum = numbers[0] for num in numbers: if num > maximum: maximum = num - Using the
reduce()function from thefunctoolsmodule:from functools import reduce numbers = [1, 2, 3, 4, 5] maximum = reduce(lambda x, y: x if x > y else y, numbers)
These are just a few examples of how you can find the maximum value in a list. There may be other methods depending on your specific use case and requirements.
8. How to drop a column from a DataFrame?
import pandas as pd
data = {'Name': ['Jul', 'Kiwi', 'Tat', 'jack'],
'Age': [20, 31, 39, 40]}
df = pd.DataFrame(data)
print(df)
a=df.drop(columns=["Age"])
print(a)
Output
Name Age
0 Jul 20
1 Kiwi 31
2 Tat 39
3 jack 40
Name
0 Jul
1 Kiwi
2 Tat
3 jack
** Process exited - Return Code: 0 **
Press Enter to exit terminal
9. How to display only specific column data of DataFrame?
import pandas as pd
data = {'Name': ['Jul', 'Kiwi', 'Tat', 'jack'],
'Age': [20, 31, 39, 40]}
df = pd.DataFrame(data)
print(df)
a=df["Age"]
print(a)
Output
Name Age
0 Jul 20
1 Kiwi 31
2 Tat 39
3 jack 40
0 20
1 31
2 39
3 40
Name: Age, dtype: int64
** Process exited - Return Code: 0 **
Press Enter to exit terminal
Related







You must be logged in to post a comment.