NumPy Exercises for Data Analysis
NumPy Array Exercises
- How to create an empty and a full NumPy array?
- Create a Numpy array filled with all zeros
- Create a Numpy array filled with all ones
- Check whether a Numpy array contains a specified row
- How to Remove rows in Numpy array that contains non-numeric values?
- Combining a one and a two-dimensional NumPy Array
- How to compare two NumPy arrays?
- How to get all 2D diagonals of a 3D NumPy array?
- Flatten a Matrix in Python using NumPy
- Counts the number of non-zero values in the array
- Trim the leading and/or trailing zeros from a 1-D array
- Reverse a numpy array
NumPy Matrix Exercises
- Get the maximum value from given matrix
- Get the minimum value from given matrix
- Find the number of rows and columns of a given matrix using NumPy
- Adding and Subtracting Matrices in Python
- Matrix Multiplication in NumPy
- Ways to add row/columns in numpy array
- Get the eigen values of a matrix
- How to count the frequency of unique values in NumPy array?
- How to inverse a matrix using NumPy
- How to Calculate the determinant of a matrix using NumPy?
- Multiply matrices of complex numbers using NumPy in Python
- Calculate inner, outer, and cross products of matrices and vectors using NumPy
- Convert covariance matrix to correlation matrix using Python
NumPy Indexing Exercises
- Replace NumPy array elements that doesn’t satisfy the given condition
- Return the indices of elements where the given condition is satisfied
- Replace negative value with zero in numpy array
- Replace NaN values with average of columns
- How to get values of an NumPy array at certain index positions?
- Find indices of elements equal to zero in a NumPy array
- How to access different rows of a multidimensional NumPy array?
- How to Remove columns in Numpy array that contains non-numeric values?
- Get row numbers of NumPy array having element larger than X
- Check elements present in the NumPy array
- Combined array index by index
NumPy Sorting and Searching Exercises
- How to get the indices of the sorted array using NumPy in Python?
- Finding the k smallest values of a NumPy array
- How to get the n-largest values of an array using NumPy?
- Sort the values in a matrix
- Filter out integers from float numpy array
- Find the indices into a sorted array
NumPy Random Exercises
- Create a Numpy array with random values
- How to choose elements from the list with different probability using NumPy?
- How to get weighted random choice in Python?
- Generate Random Numbers From The Uniform Distribution using NumPy
- Get Random Elements form geometric distribution
- Get Random elements from Laplace distribution
- Return a Matrix of random values from a uniform distribution
- Return a Matrix of random values from a Gaussian distribution
NumPy Strings Exercises
- Repeat all the elements of a NumPy array of strings
- How to split the element of a given NumPy array with spaces?
- How to insert a space between characters of all the elements of a given NumPy array?
- Find the length of each string element in the Numpy array
- Swap the case of an array of string
- Change the case to uppercase of elements of an array
- Change the case to lowercase of elements of an array
- Join String by a separator
- Check if two same shaped string arrayss one by one
- Count the number of substrings in an array
- Find the lowest index of the substring in an array
- Get the boolean array when values end with a particular character
Pandas Exercises for Data Analysis
Pandas Dataframe Exercises
- Make a Pandas DataFrame with two-dimensional list | Python
- Python | Creating DataFrame from dict of narray/lists
- Creating Pandas dataframe using list of lists
- Creating a Pandas dataframe using list of tuples
- Create a Pandas DataFrame from List of Dicts
- Python | Convert list of nested dictionary into Pandas dataframe
- Creating a dataframe from Pandas series
- Construct a DataFrame in Pandas using string data
- Clean the string data in the given Pandas Dataframe
- Replace values in Pandas dataframe using regex
- Reindexing in Pandas DataFrame
- Mapping external values to dataframe values in Pandas
- Reset Index in Pandas Dataframe
- Python | Change column names and row indexes in Pandas DataFrame
Pandas Dataframe Row Exercises
- How to iterate over rows in Pandas Dataframe
- Different ways to iterate over rows in Pandas Dataframe
- Selecting rows in pandas DataFrame based on conditions
- Select any row from a Dataframe using iloc[] and iat[] in Pandas
- Limited rows selection with given column in Pandas | Python
- Drop rows from the dataframe based on certain condition applied on a column
- Insert row at given position in Pandas Dataframe
- Create a list from rows in Pandas dataframe
- Ranking Rows of Pandas DataFrame
- Sorting rows in pandas DataFrame
- Select row with maximum and minimum value in Pandas dataframe
- Get all rows in a Pandas DataFrame containing given substring
- Convert a column to row name/index in Pandas
- How to randomly select rows from Pandas DataFrame
Pandas Daraftame Columns Exercises
- Create a pandas column using for loop
- How to get column names in Pandas dataframe
- How to rename columns in Pandas DataFrame
- Get unique values from a column in Pandas DataFrame
- Conditional operation on Pandas DataFrame columns
- Return the Index label if some condition is satisfied over a column in Pandas Dataframe
- Formatting integer column of Dataframe in Pandas
- Create a new column in Pandas DataFrame based on the existing columns
- Python | Creating a Pandas dataframe column based on a given condition
- Getting Unique values from a column in Pandas dataframe
- Split a String into columns using regex in pandas DataFrame
- Getting frequency counts of a columns in Pandas DataFrame
- Split a text column into two columns in Pandas DataFrame
- Get the index of minimum value in DataFrame column
- Get the index of maximum value in DataFrame column
- Difference of two columns in Pandas dataframe
- Get n-largest values from a particular column in Pandas DataFrame
- Get n-smallest values from a particular column in Pandas DataFrame
- How to drop one or multiple columns in Pandas Dataframe
- How to lowercase column names in Pandas dataframe
- Capitalize first letter of a column in Pandas dataframe
- Apply uppercase to a column in Pandas dataframe