Pandas NumPy Practice Questions
Pandas NumPy Practice Questions
2. Matrix Operations:
- Create two 3x3 matrices A and B using NumPy with random values between 1 and 10.
- Compute their matrix product A × B.
- Find the transpose of the result and its determinant.
4. Statistical Analysis:
- Create an array of 50 random numbers between 0 and 100.
- Find the mean, median, standard deviation, and variance of the array.
- Sort the array in descending order.
5. Broadcasting:
- Create a 3x3 matrix and a 3x1 column vector.
- Add the column vector to each row of the matrix using broadcasting.
2. Statistical Analysis:
- Create a large DataFrame with 10,000 rows and 5 columns containing random integers.
- Use NumPy to compute the correlation matrix.
- Use Pandas to identify columns with the highest correlation.
3. Performance Comparison:
- Create a NumPy array and a Pandas DataFrame, both with 1,000,000 random values.
- Compare the time taken to compute the mean of both using NumPy and Pandas.