Problem Solving Flashcards

(10 cards)

1
Q

What is NumPy used for?

A

Numerical computing in Python with array operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is pandas used for?

A

Data manipulation and analysis in Python.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to merge two pandas DataFrames?

A

Using pd.merge() or df.merge().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to handle missing values in pandas?

A

Using df.fillna() or df.dropna().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to calculate mean in NumPy?

A

Using np.mean(array).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to apply a function to each row in pandas?

A

Using df.apply(func, axis=1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to create a list comprehension in Python?

A

[expr for item in iterable if condition].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to sort a pandas DataFrame?

A

Using df.sort_values(by=’column’).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is vectorization?

A

Using array operations instead of loops for performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to create a virtual environment in Python?

A

Using python -m venv env_name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly